ob-metaflow 2.10.7.4__py2.py3-none-any.whl → 2.10.9.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ob-metaflow might be problematic. Click here for more details.
- metaflow/cards.py +2 -0
- metaflow/decorators.py +1 -1
- metaflow/metaflow_config.py +4 -0
- metaflow/plugins/__init__.py +4 -0
- metaflow/plugins/airflow/airflow_cli.py +1 -1
- metaflow/plugins/argo/argo_workflows.py +5 -0
- metaflow/plugins/argo/argo_workflows_cli.py +1 -1
- metaflow/plugins/aws/aws_utils.py +1 -1
- metaflow/plugins/aws/batch/batch.py +4 -0
- metaflow/plugins/aws/batch/batch_cli.py +3 -0
- metaflow/plugins/aws/batch/batch_client.py +40 -11
- metaflow/plugins/aws/batch/batch_decorator.py +1 -0
- metaflow/plugins/aws/step_functions/step_functions.py +1 -0
- metaflow/plugins/aws/step_functions/step_functions_cli.py +1 -1
- metaflow/plugins/azure/azure_exceptions.py +1 -1
- metaflow/plugins/cards/card_cli.py +413 -28
- metaflow/plugins/cards/card_client.py +16 -7
- metaflow/plugins/cards/card_creator.py +228 -0
- metaflow/plugins/cards/card_datastore.py +124 -26
- metaflow/plugins/cards/card_decorator.py +40 -86
- metaflow/plugins/cards/card_modules/base.html +12 -0
- metaflow/plugins/cards/card_modules/basic.py +74 -8
- metaflow/plugins/cards/card_modules/bundle.css +1 -170
- metaflow/plugins/cards/card_modules/card.py +65 -0
- metaflow/plugins/cards/card_modules/components.py +446 -81
- metaflow/plugins/cards/card_modules/convert_to_native_type.py +9 -3
- metaflow/plugins/cards/card_modules/main.js +250 -21
- metaflow/plugins/cards/card_modules/test_cards.py +117 -0
- metaflow/plugins/cards/card_resolver.py +0 -2
- metaflow/plugins/cards/card_server.py +361 -0
- metaflow/plugins/cards/component_serializer.py +506 -42
- metaflow/plugins/cards/exception.py +20 -1
- metaflow/plugins/datastores/azure_storage.py +1 -2
- metaflow/plugins/datastores/gs_storage.py +1 -2
- metaflow/plugins/datastores/s3_storage.py +2 -1
- metaflow/plugins/datatools/s3/s3.py +24 -11
- metaflow/plugins/env_escape/client.py +2 -12
- metaflow/plugins/env_escape/client_modules.py +18 -14
- metaflow/plugins/env_escape/server.py +18 -11
- metaflow/plugins/env_escape/utils.py +12 -0
- metaflow/plugins/gcp/gs_exceptions.py +1 -1
- metaflow/plugins/gcp/gs_utils.py +1 -1
- metaflow/plugins/kubernetes/kubernetes.py +43 -6
- metaflow/plugins/kubernetes/kubernetes_cli.py +40 -1
- metaflow/plugins/kubernetes/kubernetes_decorator.py +73 -6
- metaflow/plugins/kubernetes/kubernetes_job.py +536 -161
- metaflow/plugins/pypi/conda_environment.py +5 -6
- metaflow/plugins/pypi/pip.py +2 -2
- metaflow/plugins/pypi/utils.py +15 -0
- metaflow/task.py +1 -0
- metaflow/version.py +1 -1
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/METADATA +1 -1
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/RECORD +57 -55
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/WHEEL +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.10.7.4.dist-info → ob_metaflow-2.10.9.2.dist-info}/top_level.txt +0 -0
|
@@ -1,21 +1,250 @@
|
|
|
1
|
-
var app=function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function i(){return Object.create(null)}function s(t){t.forEach(n)}function o(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a;function l(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function c(e,n,i){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function h(t,e,n,i){if(t){const s=u(t,e,n,i);return t[0](s)}}function u(t,n,i,s){return t[1]&&s?e(i.ctx.slice(),t[1](s(n))):i.ctx}function d(t,e,n,i){if(t[2]&&i){const s=t[2](i(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let i=0;i<n;i+=1)t[i]=e.dirty[i]|s[i];return t}return e.dirty|s}return e.dirty}function f(t,e,n,i,s,o){if(s){const r=u(e,n,i,o);t.p(r,s)}}function p(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function g(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}function m(t,e){const n={};e=new Set(e);for(const i in t)e.has(i)||"$"===i[0]||(n[i]=t[i]);return n}const b="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function x(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function _(t){t.parentNode&&t.parentNode.removeChild(t)}function v(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function $(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function w(t){return document.createTextNode(t)}function C(){return w(" ")}function M(){return w("")}function S(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function L(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function D(t,e){for(const n in e)L(t,n,e[n])}function P(t,e){e=""+e,t.data!==e&&(t.data=e)}function O(t,e,n,i){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function A(t,e,n){t.classList[n?"add":"remove"](e)}class E{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=k(e.nodeName):this.e=$(11===e.nodeType?"TEMPLATE":e.nodeName),this.t="TEMPLATE"!==e.tagName?e:e.content,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)y(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(_)}}function T(t,e){return new t(e)}let R;function z(t){R=t}function I(){if(!R)throw new Error("Function called outside component initialization");return R}function F(t){I().$$.on_mount.push(t)}function N(){const t=I();return(e,n,{cancelable:i=!1}={})=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e,{bubbles:n=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,i,e),s}(e,n,{cancelable:i});return s.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}function j(t,e){return I().$$.context.set(t,e),e}function B(t){return I().$$.context.get(t)}const V=[],H=[];let W=[];const U=[],q=Promise.resolve();let Y=!1;function Z(t){W.push(t)}function X(t){U.push(t)}const G=new Set;let K=0;function J(){if(0!==K)return;const t=R;do{try{for(;K<V.length;){const t=V[K];K++,z(t),Q(t.$$)}}catch(t){throw V.length=0,K=0,t}for(z(null),V.length=0,K=0;H.length;)H.pop()();for(let t=0;t<W.length;t+=1){const e=W[t];G.has(e)||(G.add(e),e())}W.length=0}while(V.length);for(;U.length;)U.pop()();Y=!1,G.clear(),z(t)}function Q(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Z)}}const tt=new Set;let et;function nt(){et={r:0,c:[],p:et}}function it(){et.r||s(et.c),et=et.p}function st(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function ot(t,e,n,i){if(t&&t.o){if(tt.has(t))return;tt.add(t),et.c.push((()=>{tt.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}else i&&i()}function rt(t,e){const n={},i={},s={$$scope:1};let o=t.length;for(;o--;){const r=t[o],a=e[o];if(a){for(const t in r)t in a||(i[t]=1);for(const t in a)s[t]||(n[t]=a[t],s[t]=1);t[o]=a}else for(const t in r)s[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}function at(t){return"object"==typeof t&&null!==t?t:{}}function lt(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function ct(t){t&&t.c()}function ht(t,e,i,r){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),r||Z((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),l.forEach(Z)}function ut(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];W.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),W=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function dt(t,e){-1===t.$$.dirty[0]&&(V.push(t),Y||(Y=!0,q.then(J)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ft(e,n,o,r,a,l,c,h=[-1]){const u=R;z(e);const d=e.$$={fragment:null,ctx:[],props:l,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:i(),dirty:h,skip_bound:!1,root:n.target||u.$$.root};c&&c(d.root);let f=!1;if(d.ctx=o?o(e,n.props||{},((t,n,...i)=>{const s=i.length?i[0]:n;return d.ctx&&a(d.ctx[t],d.ctx[t]=s)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](s),f&&dt(e,t)),n})):[],d.update(),f=!0,s(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(_)}else d.fragment&&d.fragment.c();n.intro&&st(e.$$.fragment),ht(e,n.target,n.anchor,n.customElement),J()}z(u)}class pt{$destroy(){ut(this,1),this.$destroy=t}$on(e,n){if(!o(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var gt,mt,bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};gt={exports:{}},mt=function(t){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,i={},s={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function t(e){return e instanceof o?new o(e.type,t(e.content),e.alias):Array.isArray(e)?e.map(t):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(t){return Object.prototype.toString.call(t).slice(8,-1)},objId:function(t){return t.__id||Object.defineProperty(t,"__id",{value:++n}),t.__id},clone:function t(e,n){var i,o;switch(n=n||{},s.util.type(e)){case"Object":if(o=s.util.objId(e),n[o])return n[o];for(var r in i={},n[o]=i,e)e.hasOwnProperty(r)&&(i[r]=t(e[r],n));return i;case"Array":return o=s.util.objId(e),n[o]?n[o]:(i=[],n[o]=i,e.forEach((function(e,s){i[s]=t(e,n)})),i);default:return e}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var t=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(t){var e=document.getElementsByTagName("script");for(var n in e)if(e[n].src==t)return e[n]}return null}},isActive:function(t,e,n){for(var i="no-"+e;t;){var s=t.classList;if(s.contains(e))return!0;if(s.contains(i))return!1;t=t.parentElement}return!!n}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(t,e){var n=s.util.clone(s.languages[t]);for(var i in e)n[i]=e[i];return n},insertBefore:function(t,e,n,i){var o=(i=i||s.languages)[t],r={};for(var a in o)if(o.hasOwnProperty(a)){if(a==e)for(var l in n)n.hasOwnProperty(l)&&(r[l]=n[l]);n.hasOwnProperty(a)||(r[a]=o[a])}var c=i[t];return i[t]=r,s.languages.DFS(s.languages,(function(e,n){n===c&&e!=t&&(this[e]=r)})),r},DFS:function t(e,n,i,o){o=o||{};var r=s.util.objId;for(var a in e)if(e.hasOwnProperty(a)){n.call(e,a,e[a],i||a);var l=e[a],c=s.util.type(l);"Object"!==c||o[r(l)]?"Array"!==c||o[r(l)]||(o[r(l)]=!0,t(l,n,a,o)):(o[r(l)]=!0,t(l,n,null,o))}}},plugins:{},highlightAll:function(t,e){s.highlightAllUnder(document,t,e)},highlightAllUnder:function(t,e,n){var i={callback:n,container:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),s.hooks.run("before-all-elements-highlight",i);for(var o,r=0;o=i.elements[r++];)s.highlightElement(o,!0===e,i.callback)},highlightElement:function(e,n,i){var o=s.util.getLanguage(e),r=s.languages[o];s.util.setLanguage(e,o);var a=e.parentElement;a&&"pre"===a.nodeName.toLowerCase()&&s.util.setLanguage(a,o);var l={element:e,language:o,grammar:r,code:e.textContent};function c(t){l.highlightedCode=t,s.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,s.hooks.run("after-highlight",l),s.hooks.run("complete",l),i&&i.call(l.element)}if(s.hooks.run("before-sanity-check",l),(a=l.element.parentElement)&&"pre"===a.nodeName.toLowerCase()&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","0"),!l.code)return s.hooks.run("complete",l),void(i&&i.call(l.element));if(s.hooks.run("before-highlight",l),l.grammar)if(n&&t.Worker){var h=new Worker(s.filename);h.onmessage=function(t){c(t.data)},h.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(s.highlight(l.code,l.grammar,l.language));else c(s.util.encode(l.code))},highlight:function(t,e,n){var i={code:t,grammar:e,language:n};return s.hooks.run("before-tokenize",i),i.tokens=s.tokenize(i.code,i.grammar),s.hooks.run("after-tokenize",i),o.stringify(s.util.encode(i.tokens),i.language)},tokenize:function(t,e){var n=e.rest;if(n){for(var i in n)e[i]=n[i];delete e.rest}var h=new a;return l(h,h.head,t),function t(e,n,i,a,h,u){for(var d in i)if(i.hasOwnProperty(d)&&i[d]){var f=i[d];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(u&&u.cause==d+","+p)return;var g=f[p],m=g.inside,b=!!g.lookbehind,x=!!g.greedy,y=g.alias;if(x&&!g.pattern.global){var _=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,_+"g")}for(var v=g.pattern||g,$=a.next,k=h;$!==n.tail&&!(u&&k>=u.reach);k+=$.value.length,$=$.next){var w=$.value;if(n.length>e.length)return;if(!(w instanceof o)){var C,M=1;if(x){if(!(C=r(v,k,e,b))||C.index>=e.length)break;var S=C.index,L=C.index+C[0].length,D=k;for(D+=$.value.length;D<=S;)D+=($=$.next).value.length;if(k=D-=$.value.length,$.value instanceof o)continue;for(var P=$;P!==n.tail&&(D<L||"string"==typeof P.value);P=P.next)M++,D+=P.value.length;M--,w=e.slice(k,D),C.index-=k}else if(!(C=r(v,0,w,b)))continue;S=C.index;var O=C[0],A=w.slice(0,S),E=w.slice(S+O.length),T=k+w.length;u&&T>u.reach&&(u.reach=T);var R=$.prev;if(A&&(R=l(n,R,A),k+=A.length),c(n,R,M),$=l(n,R,new o(d,m?s.tokenize(O,m):O,y,O)),E&&l(n,$,E),1<M){var z={cause:d+","+p,reach:T};t(e,n,i,$.prev,k,z),u&&z.reach>u.reach&&(u.reach=z.reach)}}}}}}(t,h,e,h.head,0),function(t){for(var e=[],n=t.head.next;n!==t.tail;)e.push(n.value),n=n.next;return e}(h)},hooks:{all:{},add:function(t,e){var n=s.hooks.all;n[t]=n[t]||[],n[t].push(e)},run:function(t,e){var n=s.hooks.all[t];if(n&&n.length)for(var i,o=0;i=n[o++];)i(e)}},Token:o};function o(t,e,n,i){this.type=t,this.content=e,this.alias=n,this.length=0|(i||"").length}function r(t,e,n,i){t.lastIndex=e;var s=t.exec(n);if(s&&i&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function a(){var t={value:null,prev:null,next:null},e={value:null,prev:t,next:null};t.next=e,this.head=t,this.tail=e,this.length=0}function l(t,e,n){var i=e.next,s={value:n,prev:e,next:i};return e.next=s,i.prev=s,t.length++,s}function c(t,e,n){for(var i=e.next,s=0;s<n&&i!==t.tail;s++)i=i.next;(e.next=i).prev=e,t.length-=s}if(t.Prism=s,o.stringify=function t(e,n){if("string"==typeof e)return e;if(Array.isArray(e)){var i="";return e.forEach((function(e){i+=t(e,n)})),i}var o={type:e.type,content:t(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n},r=e.alias;r&&(Array.isArray(r)?Array.prototype.push.apply(o.classes,r):o.classes.push(r)),s.hooks.run("wrap",o);var a="";for(var l in o.attributes)a+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+a+">"+o.content+"</"+o.tag+">"},!t.document)return t.addEventListener&&(s.disableWorkerMessageHandler||t.addEventListener("message",(function(e){var n=JSON.parse(e.data),i=n.language,o=n.code,r=n.immediateClose;t.postMessage(s.highlight(o,s.languages[i],i)),r&&t.close()}),!1)),s;var h=s.util.currentScript();function u(){s.manual||s.highlightAll()}if(h&&(s.filename=h.src,h.hasAttribute("data-manual")&&(s.manual=!0)),!s.manual){var d=document.readyState;"loading"===d||"interactive"===d&&h&&h.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return s}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}),gt.exports&&(gt.exports=mt),void 0!==bt&&(bt.Prism=mt),mt.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},mt.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:mt.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/},mt.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},mt.languages.python["string-interpolation"].inside.interpolation.inside.rest=mt.languages.python,mt.languages.py=mt.languages.python;const xt=[];function yt(e,n=t){let i;const s=new Set;function o(t){if(r(e,t)&&(e=t,i)){const t=!xt.length;for(const t of s)t[1](),xt.push(t,e);if(t){for(let t=0;t<xt.length;t+=2)xt[t][0](xt[t+1]);xt.length=0}}}return{set:o,update:function(t){o(t(e))},subscribe:function(r,a=t){const l=[r,a];return s.add(l),1===s.size&&(i=n(o)||t),r(e),()=>{s.delete(l),0===s.size&&i&&(i(),i=null)}}}}const _t=yt(void 0),vt=t=>{try{const e=JSON.parse(atob(window.__MF_DATA__[t]));_t.set(e)}catch(t){fetch("/card-example.json").then((t=>t.json())).then((t=>{_t.set(t)})).catch(console.error)}},$t=yt(void 0),kt=t=>{const e={};if(!t)return e;function n(t,i=[]){var s;if("page"===t.type){const i=[];e[t.title]=i,null===(s=null==t?void 0:t.contents)||void 0===s||s.forEach((t=>n(t,i)))}"section"===t.type&&t.title&&i.push(t.title)}return null==t||t.forEach((t=>n(t))),e},wt=(t,e)=>t/(e?parseFloat(getComputedStyle(document.documentElement).fontSize.replace("px","")):16),Ct=(t,e)=>{var n;if(t&&e)return null===(n=(t=>{const e=t.split("/");return{flowname:e[0],runid:e[1],stepname:null==e?void 0:e[2],taskid:null==e?void 0:e[3]}})(t))||void 0===n?void 0:n[e]},Mt=t=>t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth;function St(t){let e,n,i,s,o,r,a,l;return{c(){e=k("svg"),n=k("title"),i=w("metaflow_logo_horizontal"),s=k("g"),o=k("g"),r=k("g"),a=k("path"),l=k("path"),L(a,"d","M223.990273,66.33 C223.515273,61.851 222.686273,57.512 221.505273,53.33 C220.325273,49.148 218.795273,45.122 216.916273,41.271 C212.845273,32.921 207.254273,25.587 200.268273,19.422 C199.270273,18.541 198.243273,17.684 197.189273,16.851 C191.255273,12.166 184.481273,8.355 177.253273,5.55 C174.156273,4.347 170.975273,3.33 167.741273,2.508 C161.273273,0.863 154.593273,0 147.943273,0 C141.755273,0 135.332273,0.576 128.687273,1.722 C127.025273,2.01 125.350273,2.332 123.661273,2.69 C120.283273,3.406 116.851273,4.265 113.365273,5.267 C104.650273,7.769 95.6022727,11.161 86.2442727,15.433 C78.7592727,18.851 71.0762727,22.832 63.2072727,27.373 C47.9762727,36.162 35.7372727,44.969 29.3592727,49.791 C29.0692727,50.01 28.7922727,50.221 28.5262727,50.423 C26.1382727,52.244 24.7522727,53.367 24.5662727,53.519 L0.549272727,73.065 C0.191272727,73.356 0.00727272727,73.773 0,74.194 C-0.00372727273,74.403 0.0362727273,74.614 0.120272727,74.811 C0.205272727,75.008 0.334272727,75.189 0.508272727,75.341 L11.7612727,85.195 C12.1692727,85.552 12.7252727,85.651 13.2162727,85.487 C13.3792727,85.432 13.5362727,85.348 13.6762727,85.234 L35.8492727,67.382 C36.0422727,67.224 37.6152727,65.949 40.3252727,63.903 C44.1192727,61.036 50.1422727,56.656 57.7292727,51.711 C62.0642727,48.884 66.9102727,45.873 72.1412727,42.854 C100.864273,26.278 126.367273,17.874 147.943273,17.874 C148.366273,17.874 148.790273,17.892 149.213273,17.902 C149.655273,17.911 150.096273,17.911 150.538273,17.93 C153.769273,18.068 156.995273,18.463 160.170273,19.097 C164.931273,20.049 169.577273,21.542 173.953273,23.524 C178.328273,25.505 182.433273,27.975 186.112273,30.88 C186.771273,31.4 187.406273,31.94 188.035273,32.485 C188.913273,33.245 189.771273,34.023 190.591273,34.83 C191.998273,36.217 193.317273,37.673 194.548273,39.195 C196.395273,41.479 198.042273,43.912 199.480273,46.485 C199.960273,47.342 200.417273,48.216 200.850273,49.105 C201.112273,49.642 201.343273,50.196 201.587273,50.743 C202.231273,52.185 202.834273,53.649 203.354273,55.158 C203.712273,56.198 204.041273,57.255 204.340273,58.326 C205.836273,63.683 206.590273,69.417 206.590273,75.469 C206.590273,81.221 205.892273,86.677 204.541273,91.804 C203.617273,95.308 202.397273,98.662 200.850273,101.833 C200.417273,102.722 199.960273,103.595 199.480273,104.453 C197.562273,107.884 195.275273,111.066 192.636273,113.976 C190.657273,116.159 188.480273,118.189 186.113273,120.058 C184.553273,121.29 182.909273,122.432 181.208273,123.503 C180.313273,124.067 179.400273,124.609 178.470273,125.126 C177.462273,125.688 176.442273,126.232 175.398273,126.737 C166.961273,130.823 157.423273,133.064 147.943273,133.064 C126.367273,133.064 100.864273,124.659 72.1412727,108.084 C70.5382727,107.159 68.4382727,105.886 66.3072727,104.575 C65.0292727,103.788 63.7402727,102.986 62.5412727,102.237 C59.3442727,100.238 56.7882727,98.61 56.7882727,98.61 C61.8362727,93.901 69.3232727,87.465 78.6472727,81.047 C80.0092727,80.11 81.4192727,79.174 82.8572727,78.243 C84.1052727,77.436 85.3712727,76.63 86.6732727,75.835 C88.2042727,74.9 89.7802727,73.981 91.3822727,73.074 C93.0482727,72.131 94.7512727,71.207 96.4902727,70.307 C111.473273,62.55 129.094273,56.602 147.943273,56.602 C151.750273,56.602 157.745273,57.825 162.114273,61.276 C162.300273,61.422 162.489273,61.578 162.677273,61.74 C163.337273,62.305 164.006273,62.966 164.634273,63.78 C164.957273,64.198 165.269273,64.657 165.564273,65.162 C166.006273,65.92 166.409273,66.782 166.750273,67.775 C166.891273,68.185 167.016273,68.627 167.134273,69.083 C167.586273,70.833 167.863273,72.924 167.863273,75.469 C167.863273,78.552 167.460273,80.974 166.824273,82.92 C166.578273,83.674 166.300273,84.363 165.992273,84.983 C165.855273,85.259 165.711273,85.524 165.564273,85.776 C165.376273,86.099 165.178273,86.396 164.977273,86.682 C164.631273,87.175 164.269273,87.618 163.900273,88.018 C163.730273,88.202 163.559273,88.379 163.387273,88.546 C162.962273,88.96 162.534273,89.331 162.114273,89.662 C157.745273,93.112 151.750273,94.337 147.943273,94.337 C144.485273,94.337 140.682273,93.926 136.589273,93.121 C133.860273,92.584 131.003273,91.871 128.033273,90.987 C123.579273,89.662 118.873273,87.952 113.970273,85.872 C113.768273,85.786 113.552273,85.747 113.336273,85.753 C113.122273,85.76 112.908273,85.813 112.713273,85.912 C106.990273,88.816 101.641273,91.995 96.7462727,95.223 C96.6232727,95.304 96.5182727,95.397 96.4302727,95.5 C95.8122727,96.22 96.0172727,97.397 96.9492727,97.822 L102.445273,100.328 C104.606273,101.314 106.737273,102.238 108.835273,103.102 C110.934273,103.966 113.001273,104.77 115.035273,105.511 C118.086273,106.624 121.064273,107.599 123.965273,108.436 C127.834273,109.551 131.567273,110.421 135.157273,111.043 C139.646273,111.82 143.912273,112.211 147.943273,112.211 C148.367273,112.211 148.923273,112.201 149.591273,112.169 C149.925273,112.153 150.287273,112.131 150.674273,112.102 C155.712273,111.724 165.055273,110.114 173.190273,103.691 C173.547273,103.41 173.869273,103.105 174.210273,102.813 C175.324273,101.86 176.381273,100.866 177.333273,99.8 C177.470273,99.648 177.590273,99.485 177.724273,99.331 C181.300273,95.167 183.699273,90.185 184.875273,84.406 C185.444273,81.609 185.737273,78.631 185.737273,75.469 C185.737273,63.315 181.516273,53.82 173.190273,47.247 C167.050273,42.399 160.228273,40.299 155.083273,39.395 C153.892273,39.186 152.790273,39.037 151.809273,38.938 C150.116273,38.766 148.774273,38.727 147.943273,38.727 C133.456273,38.727 118.519273,41.679 103.545273,47.5 C99.1222727,49.22 94.6912727,51.191 90.2702727,53.403 C88.7972727,54.141 87.3242727,54.905 85.8542727,55.696 C83.5092727,56.957 81.1722727,58.303 78.8382727,59.697 C77.3922727,60.562 75.9492727,61.451 74.5082727,62.366 C72.4422727,63.678 70.3802727,65.023 68.3302727,66.437 C63.8372727,69.535 59.7422727,72.63 56.0902727,75.567 C54.8732727,76.547 53.7052727,77.508 52.5882727,78.446 C48.1222727,82.2 44.4752727,85.581 41.7602727,88.226 C38.3032727,91.593 36.3592727,93.766 36.1632727,93.986 L35.8282727,94.362 L32.0332727,98.61 L30.6432727,100.164 C30.4962727,100.329 30.3932727,100.517 30.3312727,100.715 C30.1482727,101.307 30.3472727,101.981 30.8882727,102.368 L37.2812727,106.938 L37.4862727,107.083 L37.6922727,107.228 C39.8732727,108.766 42.0702727,110.277 44.2792727,111.758 C45.8422727,112.807 47.4102727,113.84 48.9832727,114.858 C51.5302727,116.508 54.0902727,118.103 56.6542727,119.665 C57.8412727,120.388 59.0282727,121.101 60.2162727,121.804 C61.2142727,122.394 62.2102727,122.989 63.2072727,123.565 C76.9772727,131.512 90.1802727,137.744 102.748273,142.242 C104.544273,142.884 106.326273,143.491 108.096273,144.063 C111.635273,145.206 115.121273,146.207 118.553273,147.067 C121.986273,147.925 125.364273,148.642 128.687273,149.215 C135.332273,150.362 141.755273,150.938 147.943273,150.938 C154.593273,150.938 161.273273,150.074 167.741273,148.43 C174.209273,146.786 180.465273,144.361 186.265273,141.238 C190.133273,139.156 193.798273,136.764 197.189273,134.087 C200.352273,131.589 203.264273,128.872 205.911273,125.949 C207.677273,124 209.325273,121.96 210.854273,119.831 C211.618273,118.766 212.353273,117.68 213.057273,116.571 C214.466273,114.356 215.753273,112.053 216.916273,109.667 C220.701273,101.906 223.073273,93.439 224.008273,84.406 C224.310273,81.485 224.465273,78.505 224.465273,75.469 C224.465273,72.364 224.306273,69.316 223.990273,66.33"),L(a,"id","Fill-1"),L(a,"fill","#146EE6"),L(l,"d","M758.389273,75.346 C752.632273,111.56 742.681273,122.23 712.102273,122.23 C710.847273,122.23 709.640273,122.207 708.464273,122.17 C708.321273,122.191 708.191273,122.23 708.028273,122.23 L637.994273,122.23 C636.795273,122.23 636.315273,121.632 636.435273,120.311 L650.585273,31.22 C650.704273,30.016 651.424273,29.417 652.623273,29.417 L667.852273,29.417 C669.050273,29.417 669.530273,30.016 669.410273,31.22 L657.659273,105.802 L714.249273,105.802 L714.249273,105.787 C714.410273,105.794 714.568273,105.802 714.741273,105.802 C718.878273,105.802 722.250273,105.351 725.040273,104.313 C726.434273,103.794 727.684273,103.129 728.810273,102.298 C729.373273,101.884 729.905273,101.426 730.410273,100.927 C734.951273,96.431 737.231273,88.43 739.322273,75.346 C739.328273,75.312 739.331273,75.282 739.337273,75.25 C739.642273,73.311 739.896273,71.474 740.130273,69.679 C740.203273,69.116 740.272273,68.557 740.338273,68.008 C740.412273,67.392 740.461273,66.821 740.525273,66.222 C742.136273,49.927 738.622273,44.525 724.454273,44.525 C723.419273,44.525 722.433273,44.554 721.490273,44.613 C708.297273,45.444 703.831273,52.303 700.461273,71.126 C700.220273,72.472 699.984273,73.877 699.752273,75.346 C699.483273,77.027 699.255273,78.6 699.052273,80.115 C698.993273,80.545 698.948273,80.946 698.895273,81.361 C698.757273,82.465 698.638273,83.528 698.540273,84.544 C698.502273,84.943 698.466273,85.334 698.434273,85.72 C698.344273,86.815 698.281273,87.856 698.246273,88.847 C698.238273,89.049 698.224273,89.269 698.219273,89.469 C698.161273,91.88 698.289273,93.972 698.621273,95.782 C698.649273,95.941 698.686273,96.089 698.717273,96.246 C698.874273,96.992 699.067273,97.689 699.301273,98.337 C699.346273,98.464 699.390273,98.594 699.439273,98.718 C700.039273,100.231 700.864273,101.478 701.963273,102.469 C702.263273,102.738 702.586273,102.987 702.925273,103.22 L679.436273,103.22 C679.393273,102.969 679.343273,102.727 679.305273,102.471 L679.304273,102.471 C679.304273,102.467 679.304273,102.462 679.303273,102.459 C679.259273,102.17 679.236273,101.854 679.198273,101.558 C679.083273,100.634 678.995273,99.671 678.934273,98.674 C678.908273,98.258 678.879273,97.845 678.862273,97.419 C678.816273,96.174 678.804273,94.876 678.832273,93.518 C678.840273,93.114 678.861273,92.69 678.876273,92.276 C678.920273,91.042 678.991273,89.765 679.092273,88.441 C679.117273,88.109 679.134273,87.79 679.162273,87.452 C679.299273,85.836 679.483273,84.137 679.698273,82.382 C679.750273,81.957 679.807273,81.518 679.863273,81.084 C680.104273,79.238 680.369273,77.344 680.687273,75.346 C681.046273,73.067 681.423273,70.889 681.819273,68.808 C687.040273,41.397 695.809273,30.748 717.267273,28.554 C720.250273,28.25 723.472273,28.103 726.971273,28.103 C726.972273,28.103 726.972273,28.103 726.972273,28.103 C747.994273,28.103 757.680273,33.202 759.811273,48.236 C760.779273,55.067 760.187273,63.953 758.389273,75.346 Z M894.023273,31.336 L866.923273,108.56 C863.472273,118.182 861.113273,121.41 854.499273,122.41 C852.379273,122.733 849.831273,122.828 846.659273,122.828 C831.670273,122.828 830.350273,121.267 829.392273,108.56 L825.794273,63.232 L825.794273,63.231 L807.928273,108.56 C804.255273,117.613 802.201273,120.996 795.961273,122.202 C793.442273,122.687 790.260273,122.829 785.985273,122.829 C772.914273,122.829 770.756273,121.267 770.396273,108.56 L767.638273,31.337 C767.638273,29.899 768.238273,29.417 769.557273,29.417 L785.385273,29.417 C786.464273,29.417 786.704273,29.899 786.824273,31.337 L788.895273,100.572 L788.895273,100.571 C789.054273,103.091 789.563273,103.641 791.021273,103.641 C792.939273,103.641 793.419273,103.042 794.618273,100.043 L820.758273,34.576 C821.358273,33.132 822.437273,32.657 823.516273,32.657 L837.665273,32.657 C838.519273,32.657 839.279273,32.977 839.626273,33.817 C839.718273,34.038 839.799273,34.274 839.824273,34.576 L845.220273,100.043 C845.460273,103.042 845.819273,103.641 847.738273,103.641 C849.297273,103.641 849.896273,103.042 850.976273,100.043 L874.838273,31.336 C875.317273,29.898 875.677273,29.417 876.756273,29.417 L892.584273,29.417 C893.903273,29.417 894.383273,29.898 894.023273,31.336 Z M362.708273,31.219 L357.192273,120.311 C357.192273,121.632 356.353273,122.23 355.154273,122.23 L339.926273,122.23 C338.726273,122.23 338.366273,121.632 338.366273,120.311 L342.324273,62.756 L311.986273,117.551 C311.386273,118.749 310.428273,119.348 309.229273,119.348 L297.837273,119.348 C296.758273,119.348 296.038273,118.749 295.560273,117.551 L282.851273,62.767 L282.848273,62.755 L268.339273,120.31 C268.212273,121.009 267.974273,121.492 267.612273,121.807 C267.288273,122.085 266.865273,122.23 266.301273,122.23 L251.073273,122.23 C249.874273,122.23 249.273273,121.632 249.514273,120.31 L272.296273,31.336 C272.537273,30.138 272.897273,29.417 274.095273,29.417 L288.605273,29.417 C291.236273,29.417 292.726273,29.895 293.682273,31.379 C294.120273,32.059 294.457273,32.928 294.720273,34.095 L307.790273,92.489 L339.326273,34.095 C341.485273,30.256 343.043273,29.299 346.880273,29.299 L361.389273,29.299 C362.376273,29.299 362.682273,30.684 362.682273,30.684 C362.682273,30.684 362.708273,31.029 362.708273,31.219 Z M501.706273,31.219 L499.667273,44.049 C499.547273,45.246 498.708273,45.845 497.509273,45.845 L472.448273,45.845 L460.696273,120.31 C460.457273,121.632 459.738273,122.23 458.538273,122.23 L443.309273,122.23 C442.111273,122.23 441.631273,121.632 441.870273,120.31 L453.622273,45.845 L394.820273,45.845 L391.224273,68.507 L391.224273,68.508 L430.555273,68.508 C431.754273,68.508 432.353273,69.106 432.234273,70.31 L430.196273,82.542 C430.076273,83.738 429.236273,84.338 428.038273,84.338 L388.706273,84.338 L385.349273,105.801 L428.397273,105.801 C429.596273,105.801 430.076273,106.4 429.955273,107.597 L427.797273,120.428 C427.676273,121.632 426.958273,122.23 425.759273,122.23 L365.683273,122.23 C364.484273,122.23 364.004273,121.632 364.124273,120.31 L378.273273,31.219 C378.393273,30.015 379.112273,29.417 380.313273,29.417 L500.147273,29.417 C501.346273,29.417 501.826273,30.015 501.706273,31.219 Z M629.471273,70.426 L627.433273,82.659 C627.313273,83.856 626.473273,84.454 625.275273,84.454 L588.223273,84.454 L582.466273,120.311 C582.347273,121.632 581.627273,122.23 580.428273,122.23 L565.200273,122.23 C564.001273,122.23 563.522273,121.632 563.640273,120.311 L577.790273,31.219 C577.910273,30.016 578.629273,29.417 579.828273,29.417 L643.004273,29.417 C644.202273,29.417 644.802273,30.016 644.682273,31.219 L642.644273,44.05 C642.403273,45.247 641.685273,45.846 640.486273,45.846 L594.337273,45.846 L590.741273,68.631 L627.793273,68.631 C628.991273,68.631 629.592273,69.23 629.471273,70.426 Z M388.706273,84.338 L388.712273,84.338 L388.309273,86.876 L388.706273,84.338 Z M510.726273,79.783 L524.396273,48.006 C525.036273,46.466 525.443273,45.589 525.990273,45.096 C526.465273,44.667 527.044273,44.525 527.993273,44.525 C530.391273,44.525 530.391273,45.124 530.751273,48.006 L534.348273,79.783 L510.726273,79.783 Z M542.334273,29.886 C539.756273,28.905 536.043273,28.702 530.511273,28.702 C516.601273,28.702 513.963273,30.016 508.208273,43.087 L474.633273,120.311 C474.154273,121.749 474.513273,122.23 475.832273,122.23 L491.060273,122.23 C492.259273,122.23 492.500273,121.749 493.099273,120.311 L504.011273,95.372 L536.026273,95.372 L539.024273,120.311 C539.144273,121.749 539.144273,122.23 540.344273,122.23 L555.572273,122.23 C556.891273,122.23 557.490273,121.749 557.490273,120.311 L548.617273,43.087 C547.658273,35.042 546.460273,31.458 542.334273,29.886 L542.334273,29.886 Z"),L(l,"id","Fill-2"),L(l,"fill","#333333"),L(r,"id","metaflow_logo_horizontal"),L(r,"transform","translate(92.930727, 93.190000)"),L(o,"id","Metaflow_Logo_Horizontal_TwoColor_Dark_RGB"),L(o,"transform","translate(-92.000000, -93.000000)"),L(s,"id","Page-1"),L(s,"stroke","none"),L(s,"stroke-width","1"),L(s,"fill","none"),L(s,"fill-rule","evenodd"),L(e,"xmlns","http://www.w3.org/2000/svg"),L(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),L(e,"width","896px"),L(e,"height","152px"),L(e,"viewBox","0 0 896 152"),L(e,"version","1.1")},m(t,c){y(t,e,c),x(e,n),x(n,i),x(e,s),x(s,o),x(o,r),x(r,a),x(r,l)},d(t){t&&_(e)}}}function Lt(t){let e,n,i;return{c(){e=k("svg"),n=k("path"),i=k("path"),L(n,"fill-rule","evenodd"),L(n,"clip-rule","evenodd"),L(n,"d","M223.991 66.33C223.516 61.851 222.687 57.512 221.506 53.33C220.326 49.148 218.796 45.122 216.917 41.271C212.846 32.921 207.255 25.587 200.269 19.422C199.271 18.541 198.244 17.684 197.19 16.851C191.256 12.166 184.482 8.355 177.254 5.55C174.157 4.347 170.976 3.33 167.742 2.508C161.274 0.863 154.594 0 147.944 0C141.756 0 135.333 0.576 128.688 1.722C127.026 2.01 125.351 2.332 123.662 2.69C120.284 3.406 116.852 4.265 113.366 5.267C104.651 7.769 95.6025 11.161 86.2445 15.433C78.7595 18.851 71.0765 22.832 63.2075 27.373C47.9765 36.162 35.7375 44.969 29.3595 49.791C29.0695 50.01 28.7925 50.221 28.5265 50.423C26.1385 52.244 24.7525 53.367 24.5665 53.519L0.549511 73.065C0.191511 73.356 0.00751099 73.773 0.000238261 74.194C-0.00348901 74.403 0.036511 74.614 0.120511 74.811C0.205511 75.008 0.334511 75.189 0.508511 75.341L11.7615 85.195C12.1695 85.552 12.7255 85.651 13.2165 85.487C13.3795 85.432 13.5365 85.348 13.6765 85.234L35.8495 67.382C36.0425 67.224 37.6155 65.949 40.3255 63.903C44.1195 61.036 50.1425 56.656 57.7295 51.711C62.0645 48.884 66.9105 45.873 72.1415 42.854C100.865 26.278 126.368 17.874 147.944 17.874C148.367 17.874 148.791 17.892 149.214 17.902C149.656 17.911 150.097 17.911 150.539 17.93C153.77 18.068 156.996 18.463 160.171 19.097C164.932 20.049 169.578 21.542 173.954 23.524C178.329 25.505 182.434 27.975 186.113 30.88C186.772 31.4 187.407 31.94 188.036 32.485C188.914 33.245 189.772 34.023 190.592 34.83C191.999 36.217 193.318 37.673 194.549 39.195C196.396 41.479 198.043 43.912 199.481 46.485C199.961 47.342 200.418 48.216 200.851 49.105C201.113 49.642 201.344 50.196 201.588 50.743C202.232 52.185 202.835 53.649 203.355 55.158C203.713 56.198 204.042 57.255 204.341 58.326C205.837 63.683 206.591 69.417 206.591 75.469C206.591 81.221 205.893 86.677 204.542 91.804C203.618 95.308 202.398 98.662 200.851 101.833C200.418 102.722 199.961 103.595 199.481 104.453C197.563 107.884 195.276 111.066 192.637 113.976C190.658 116.159 188.481 118.189 186.114 120.058C184.554 121.29 182.91 122.432 181.209 123.503C180.314 124.067 179.401 124.609 178.471 125.126C177.463 125.688 176.443 126.232 175.399 126.737C166.962 130.823 157.424 133.064 147.944 133.064C126.368 133.064 100.865 124.659 72.1415 108.084C70.5385 107.159 68.4385 105.886 66.3075 104.575C65.0295 103.788 63.7405 102.986 62.5415 102.237C59.3445 100.238 56.7885 98.61 56.7885 98.61C61.8365 93.901 69.3235 87.465 78.6475 81.047C80.0095 80.11 81.4195 79.174 82.8575 78.243C84.1055 77.436 85.3715 76.63 86.6735 75.835C88.2045 74.9 89.7805 73.981 91.3825 73.074C93.0485 72.131 94.7515 71.207 96.4905 70.307C111.474 62.55 129.095 56.602 147.944 56.602C151.751 56.602 157.746 57.825 162.115 61.276C162.301 61.422 162.49 61.578 162.678 61.74C163.338 62.305 164.007 62.966 164.635 63.78C164.958 64.198 165.27 64.657 165.565 65.162C166.007 65.92 166.41 66.782 166.751 67.775C166.892 68.185 167.017 68.627 167.135 69.083C167.587 70.833 167.864 72.924 167.864 75.469C167.864 78.552 167.461 80.974 166.825 82.92C166.579 83.674 166.301 84.363 165.993 84.983C165.856 85.259 165.712 85.524 165.565 85.776C165.377 86.099 165.179 86.396 164.978 86.682C164.632 87.175 164.27 87.618 163.901 88.018C163.731 88.202 163.56 88.379 163.388 88.546C162.963 88.96 162.535 89.331 162.115 89.662C157.746 93.112 151.751 94.337 147.944 94.337C144.486 94.337 140.683 93.926 136.59 93.121C133.861 92.584 131.004 91.871 128.034 90.987C123.58 89.662 118.874 87.952 113.971 85.872C113.769 85.786 113.553 85.747 113.337 85.753C113.123 85.76 112.909 85.813 112.714 85.912C106.991 88.816 101.642 91.995 96.7465 95.223C96.6235 95.304 96.5185 95.397 96.4305 95.5C95.8125 96.22 96.0175 97.397 96.9495 97.822L102.446 100.328C104.607 101.314 106.738 102.238 108.836 103.102C110.935 103.966 113.002 104.77 115.036 105.511C118.087 106.624 121.065 107.599 123.966 108.436C127.835 109.551 131.568 110.421 135.158 111.043C139.647 111.82 143.913 112.211 147.944 112.211C148.368 112.211 148.924 112.201 149.592 112.169C149.926 112.153 150.288 112.131 150.675 112.102C155.713 111.724 165.056 110.114 173.191 103.691C173.548 103.41 173.87 103.105 174.211 102.813C175.325 101.86 176.382 100.866 177.334 99.8C177.471 99.648 177.591 99.485 177.725 99.331C181.301 95.167 183.7 90.185 184.876 84.406C185.445 81.609 185.738 78.631 185.738 75.469C185.738 63.315 181.517 53.82 173.191 47.247C167.051 42.399 160.229 40.299 155.084 39.395C153.893 39.186 152.791 39.037 151.81 38.938C150.117 38.766 148.775 38.727 147.944 38.727C133.457 38.727 118.52 41.679 103.546 47.5C99.1225 49.22 94.6915 51.191 90.2705 53.403C88.7975 54.141 87.3245 54.905 85.8545 55.696C83.5095 56.957 81.1725 58.303 78.8385 59.697C77.3925 60.562 75.9495 61.451 74.5085 62.366C72.4425 63.678 70.3805 65.023 68.3305 66.437C63.8375 69.535 59.7425 72.63 56.0905 75.567C54.8735 76.547 53.7055 77.508 52.5885 78.446C48.1225 82.2 44.4755 85.581 41.7605 88.226C38.3035 91.593 36.3595 93.766 36.1635 93.986L35.8285 94.362L32.0335 98.61L30.6435 100.164C30.4965 100.329 30.3935 100.517 30.3315 100.715C30.1485 101.307 30.3475 101.981 30.8885 102.368L37.2815 106.938L37.4865 107.083L37.6925 107.228C39.8735 108.766 42.0705 110.277 44.2795 111.758C45.8425 112.807 47.4105 113.84 48.9835 114.858C51.5305 116.508 54.0905 118.103 56.6545 119.665C57.8415 120.388 59.0285 121.101 60.2165 121.804C61.2145 122.394 62.2105 122.989 63.2075 123.565C76.9775 131.512 90.1805 137.744 102.749 142.242C104.545 142.884 106.327 143.491 108.097 144.063C111.636 145.206 115.122 146.207 118.554 147.067C121.987 147.925 125.365 148.642 128.688 149.215C135.333 150.362 141.756 150.938 147.944 150.938C154.594 150.938 161.274 150.074 167.742 148.43C174.21 146.786 180.466 144.361 186.266 141.238C190.134 139.156 193.799 136.764 197.19 134.087C200.353 131.589 203.265 128.872 205.912 125.949C207.678 124 209.326 121.96 210.855 119.831C211.619 118.766 212.354 117.68 213.058 116.571C214.467 114.356 215.754 112.053 216.917 109.667C220.702 101.906 223.074 93.439 224.009 84.406C224.311 81.485 224.466 78.505 224.466 75.469C224.466 72.364 224.307 69.316 223.991 66.33Z"),L(n,"fill","#146EE6"),L(i,"fill-rule","evenodd"),L(i,"clip-rule","evenodd"),L(i,"d","M758.39 75.346C752.633 111.56 742.682 122.23 712.103 122.23C710.848 122.23 709.641 122.207 708.465 122.17C708.322 122.191 708.192 122.23 708.029 122.23H637.995C636.796 122.23 636.316 121.632 636.436 120.311L650.586 31.22C650.705 30.016 651.425 29.417 652.624 29.417H667.853C669.051 29.417 669.531 30.016 669.411 31.22L657.66 105.802H714.25V105.787C714.411 105.794 714.569 105.802 714.742 105.802C718.879 105.802 722.251 105.351 725.041 104.313C726.435 103.794 727.685 103.129 728.811 102.298C729.374 101.884 729.906 101.426 730.411 100.927C734.952 96.431 737.232 88.43 739.323 75.346C739.329 75.312 739.332 75.282 739.338 75.25C739.643 73.311 739.896 71.474 740.13 69.679C740.203 69.116 740.273 68.557 740.339 68.008C740.413 67.392 740.462 66.821 740.526 66.222C742.137 49.927 738.623 44.525 724.455 44.525C723.42 44.525 722.434 44.554 721.491 44.613C708.298 45.444 703.831 52.303 700.461 71.126C700.22 72.472 699.985 73.877 699.753 75.346C699.484 77.027 699.255 78.6 699.052 80.115C698.993 80.545 698.949 80.946 698.896 81.361C698.758 82.465 698.639 83.528 698.541 84.544C698.503 84.943 698.467 85.334 698.435 85.72C698.345 86.815 698.282 87.856 698.247 88.847C698.239 89.049 698.225 89.269 698.22 89.469C698.162 91.88 698.29 93.972 698.622 95.782C698.65 95.941 698.687 96.089 698.718 96.246C698.875 96.992 699.068 97.689 699.302 98.337C699.347 98.464 699.391 98.594 699.44 98.718C700.04 100.231 700.865 101.478 701.964 102.469C702.264 102.738 702.587 102.987 702.926 103.22H679.437C679.394 102.969 679.344 102.727 679.306 102.471H679.305C679.305 102.467 679.305 102.462 679.304 102.459C679.26 102.17 679.237 101.854 679.199 101.558C679.084 100.634 678.996 99.671 678.935 98.674C678.909 98.258 678.879 97.845 678.862 97.419C678.816 96.174 678.805 94.876 678.833 93.518C678.841 93.114 678.862 92.69 678.877 92.276C678.921 91.042 678.992 89.765 679.093 88.441C679.118 88.109 679.135 87.79 679.163 87.452C679.3 85.836 679.484 84.137 679.699 82.382C679.751 81.957 679.808 81.518 679.864 81.084C680.105 79.238 680.37 77.344 680.688 75.346C681.046 73.067 681.424 70.889 681.82 68.808C687.041 41.397 695.81 30.748 717.268 28.554C720.251 28.25 723.472 28.103 726.971 28.103C726.972 28.103 726.973 28.103 726.973 28.103C747.995 28.103 757.681 33.202 759.812 48.236C760.78 55.067 760.188 63.953 758.39 75.346ZM894.023 31.336L866.924 108.56C863.473 118.182 861.114 121.41 854.5 122.41C852.38 122.733 849.832 122.828 846.66 122.828C831.671 122.828 830.351 121.267 829.393 108.56L825.794 63.232V63.231L807.929 108.56C804.256 117.613 802.201 120.996 795.961 122.202C793.442 122.687 790.261 122.829 785.986 122.829C772.915 122.829 770.757 121.267 770.397 108.56L767.638 31.337C767.638 29.899 768.238 29.417 769.557 29.417H785.385C786.464 29.417 786.705 29.899 786.825 31.337L788.896 100.572V100.571C789.055 103.091 789.564 103.641 791.022 103.641C792.94 103.641 793.42 103.042 794.619 100.043L820.759 34.576C821.359 33.132 822.438 32.657 823.517 32.657H837.666C838.52 32.657 839.28 32.977 839.627 33.817C839.719 34.038 839.8 34.274 839.825 34.576L845.221 100.043C845.461 103.042 845.82 103.641 847.739 103.641C849.298 103.641 849.897 103.042 850.977 100.043L874.839 31.336C875.318 29.898 875.678 29.417 876.757 29.417H892.585C893.904 29.417 894.383 29.898 894.023 31.336ZM362.709 31.219L357.193 120.311C357.193 121.632 356.354 122.23 355.155 122.23H339.927C338.727 122.23 338.367 121.632 338.367 120.311L342.325 62.756L311.987 117.551C311.387 118.749 310.429 119.348 309.23 119.348H297.838C296.759 119.348 296.039 118.749 295.561 117.551L282.852 62.767L282.849 62.755L268.34 120.31C268.213 121.009 267.975 121.492 267.613 121.807C267.289 122.085 266.866 122.23 266.302 122.23H251.074C249.875 122.23 249.274 121.632 249.515 120.31L272.297 31.336C272.538 30.138 272.898 29.417 274.096 29.417H288.606C291.237 29.417 292.727 29.895 293.683 31.379C294.121 32.059 294.458 32.928 294.721 34.095L307.791 92.489L339.327 34.095C341.486 30.256 343.044 29.299 346.881 29.299H361.39C362.377 29.299 362.683 30.684 362.683 30.684C362.683 30.684 362.709 31.029 362.709 31.219ZM501.707 31.219L499.668 44.049C499.548 45.246 498.709 45.845 497.51 45.845H472.449L460.697 120.31C460.458 121.632 459.739 122.23 458.539 122.23H443.31C442.112 122.23 441.632 121.632 441.871 120.31L453.623 45.845H394.821L391.225 68.507V68.508H430.556C431.755 68.508 432.354 69.106 432.235 70.31L430.197 82.542C430.077 83.738 429.237 84.338 428.039 84.338H388.707L385.35 105.801H428.398C429.597 105.801 430.077 106.4 429.956 107.597L427.798 120.428C427.677 121.632 426.959 122.23 425.76 122.23H365.684C364.485 122.23 364.005 121.632 364.125 120.31L378.274 31.219C378.394 30.015 379.113 29.417 380.314 29.417H500.148C501.347 29.417 501.827 30.015 501.707 31.219ZM629.471 70.426L627.434 82.659C627.314 83.856 626.474 84.454 625.276 84.454H588.224L582.466 120.311C582.347 121.632 581.628 122.23 580.429 122.23H565.201C564.002 122.23 563.523 121.632 563.641 120.311L577.791 31.219C577.911 30.016 578.629 29.417 579.828 29.417H643.005C644.203 29.417 644.802 30.016 644.682 31.219L642.645 44.05C642.404 45.247 641.686 45.846 640.487 45.846H594.338L590.742 68.631H627.794C628.992 68.631 629.592 69.23 629.471 70.426ZM388.707 84.338H388.713L388.31 86.876L388.707 84.338ZM510.727 79.783L524.397 48.006C525.037 46.466 525.444 45.589 525.991 45.096C526.466 44.667 527.045 44.525 527.994 44.525C530.392 44.525 530.392 45.124 530.752 48.006L534.349 79.783H510.727ZM542.335 29.886C539.757 28.905 536.044 28.702 530.512 28.702C516.602 28.702 513.964 30.016 508.209 43.087L474.634 120.311C474.155 121.749 474.514 122.23 475.833 122.23H491.061C492.26 122.23 492.501 121.749 493.1 120.311L504.012 95.372H536.026L539.025 120.311C539.145 121.749 539.145 122.23 540.345 122.23H555.573C556.892 122.23 557.491 121.749 557.491 120.311L548.617 43.087C547.658 35.042 546.461 31.458 542.335 29.886Z"),L(i,"fill","white"),L(e,"width","895"),L(e,"height","151"),L(e,"viewBox","0 0 895 151"),L(e,"fill","none"),L(e,"xmlns","http://www.w3.org/2000/svg")},m(t,s){y(t,e,s),x(e,n),x(e,i)},d(t){t&&_(e)}}}function Dt(e){let n;function i(t,e){return t[0]?Lt:St}let s=i(e),o=s(e);return{c(){o.c(),n=M()},m(t,e){o.m(t,e),y(t,n,e)},p(t,[e]){s!==(s=i(t))&&(o.d(1),o=s(t),o&&(o.c(),o.m(n.parentNode,n)))},i:t,o:t,d(t){o.d(t),t&&_(n)}}}function Pt(t,e,n){let{light:i=!1}=e;return t.$$set=t=>{"light"in t&&n(0,i=t.light)},[i]}class Ot extends pt{constructor(t){super(),ft(this,t,Pt,Dt,r,{light:0})}}function At(t){let e,n,i,s,o,r;s=new Ot({});const a=t[1].default,l=h(a,t,t[0],null);return{c(){e=$("aside"),n=$("div"),i=$("div"),ct(s.$$.fragment),o=C(),l&&l.c(),L(i,"class","logoContainer"),L(e,"class","svelte-1okdv0e")},m(t,a){y(t,e,a),x(e,n),x(n,i),ht(s,i,null),x(n,o),l&&l.m(n,null),r=!0},p(t,[e]){l&&l.p&&(!r||1&e)&&f(l,a,t,t[0],r?d(a,t[0],e,null):p(t[0]),null)},i(t){r||(st(s.$$.fragment,t),st(l,t),r=!0)},o(t){ot(s.$$.fragment,t),ot(l,t),r=!1},d(t){t&&_(e),ut(s),l&&l.d(t)}}}function Et(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}class Tt extends pt{constructor(t){super(),ft(this,t,Et,At,r,{})}}function Rt(t){let e,n;return{c(){e=$("td"),n=w(t[0]),L(e,"class","idCell svelte-pt8vzv"),L(e,"data-component","artifact-row")},m(t,i){y(t,e,i),x(e,n)},p(t,e){1&e&&P(n,t[0])},d(t){t&&_(e)}}}function zt(e){let n,i,s,o,r,a,l=e[1].data+"",c=null!==e[0]&&Rt(e);return{c(){n=$("tr"),c&&c.c(),i=C(),s=$("td"),o=$("code"),r=w(l),L(o,"class","mono"),L(s,"class","codeCell svelte-pt8vzv"),L(s,"colspan",a=null===e[0]?2:1),L(s,"data-component","artifact-row")},m(t,a){y(t,n,a),c&&c.m(n,null),x(n,i),x(n,s),x(s,o),x(o,r),e[3](o)},p(t,[e]){null!==t[0]?c?c.p(t,e):(c=Rt(t),c.c(),c.m(n,i)):c&&(c.d(1),c=null),2&e&&l!==(l=t[1].data+"")&&P(r,l),1&e&&a!==(a=null===t[0]?2:1)&&L(s,"colspan",a)},i:t,o:t,d(t){t&&_(n),c&&c.d(),e[3](null)}}}function It(t,e,n){let i,{id:s}=e,{artifact:o}=e;return t.$$set=t=>{"id"in t&&n(0,s=t.id),"artifact"in t&&n(1,o=t.artifact)},t.$$.update=()=>{4&t.$$.dirty&&i&&function(){var t;i&&!i.classList.contains("language-python")&&"undefined"!=typeof window&&(null===(t=null===window||void 0===window?void 0:window.Prism)||void 0===t||t.highlightElement(i))}()},[s,o,i,function(t){H[t?"unshift":"push"]((()=>{i=t,n(2,i)}))}]}class Ft extends pt{constructor(t){super(),ft(this,t,It,zt,r,{id:0,artifact:1})}}function Nt(t,e,n){const i=t.slice();return i[3]=e[n],i}function jt(e){let n,i;return n=new Ft({props:{id:e[3].name,artifact:e[3]}}),{c(){ct(n.$$.fragment)},m(t,e){ht(n,t,e),i=!0},p:t,i(t){i||(st(n.$$.fragment,t),i=!0)},o(t){ot(n.$$.fragment,t),i=!1},d(t){ut(n,t)}}}function Bt(t){let e,n,i,s=t[0],o=[];for(let e=0;e<s.length;e+=1)o[e]=jt(Nt(t,s,e));const r=t=>ot(o[t],1,1,(()=>{o[t]=null}));return{c(){e=$("div"),n=$("table");for(let t=0;t<o.length;t+=1)o[t].c();L(n,"class","language-python svelte-ubs992"),L(e,"class","container svelte-ubs992"),L(e,"data-component","artifacts")},m(t,s){y(t,e,s),x(e,n);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(n,null);i=!0},p(t,[e]){if(1&e){let i;for(s=t[0],i=0;i<s.length;i+=1){const r=Nt(t,s,i);o[i]?(o[i].p(r,e),st(o[i],1)):(o[i]=jt(r),o[i].c(),st(o[i],1),o[i].m(n,null))}for(nt(),i=s.length;i<o.length;i+=1)r(i);it()}},i(t){if(!i){for(let t=0;t<s.length;t+=1)st(o[t]);i=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)ot(o[t]);i=!1},d(t){t&&_(e),v(o,t)}}}function Vt(t,e,n){let{componentData:i}=e;const{data:s}=i,o=s.sort(((t,e)=>{if(t.name&&e.name){if(t.name>e.name)return 1;if(t.name<e.name)return-1}return 0}));return t.$$set=t=>{"componentData"in t&&n(1,i=t.componentData)},[o,i]}class Ht extends pt{constructor(t){super(),ft(this,t,Vt,Bt,r,{componentData:1})}}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* (c) 2022 Chart.js Contributors
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function Qe(t){return t+.5|0}const tn=(t,e,n)=>Math.max(Math.min(t,n),e);function en(t){return tn(Qe(2.55*t),0,255)}function nn(t){return tn(Qe(255*t),0,255)}function sn(t){return tn(Qe(t/2.55)/100,0,1)}function on(t){return tn(Qe(100*t),0,100)}const rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},an=[..."0123456789ABCDEF"],ln=t=>an[15&t],cn=t=>an[(240&t)>>4]+an[15&t],hn=t=>(240&t)>>4==(15&t),un=t=>hn(t.r)&&hn(t.g)&&hn(t.b)&&hn(t.a);const dn=(t,e)=>t<255?e(t):"";const fn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pn(t,e,n){const i=e*Math.min(n,1-n),s=(e,s=(e+t/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function gn(t,e,n){const i=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function mn(t,e,n){const i=pn(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function bn(t){const e=t.r/255,n=t.g/255,i=t.b/255,s=Math.max(e,n,i),o=Math.min(e,n,i),r=(s+o)/2;let a,l,c;return s!==o&&(c=s-o,l=r>.5?c/(2-s-o):c/(s+o),a=function(t,e,n,i,s){return t===s?(e-n)/i+(e<n?6:0):e===s?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,s),a=60*a+.5),[0|a,l||0,r]}function xn(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(nn)}function yn(t,e,n){return xn(pn,t,e,n)}function _n(t){return(t%360+360)%360}function vn(t){const e=fn.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?en(+e[5]):nn(+e[5]));const s=_n(+e[2]),o=+e[3]/100,r=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return xn(mn,t,e,n)}(s,o,r):"hsv"===e[1]?function(t,e,n){return xn(gn,t,e,n)}(s,o,r):yn(s,o,r),{r:n[0],g:n[1],b:n[2],a:i}}const $n={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},kn={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let wn;function Cn(t){wn||(wn=function(){const t={},e=Object.keys(kn),n=Object.keys($n);let i,s,o,r,a;for(i=0;i<e.length;i++){for(r=a=e[i],s=0;s<n.length;s++)o=n[s],a=a.replace(o,$n[o]);o=parseInt(kn[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),wn.transparent=[0,0,0,0]);const e=wn[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Mn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Sn=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ln=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Dn(t,e,n){if(t){let i=bn(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=yn(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Pn(t,e){return t?Object.assign(e||{},t):t}function On(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=nn(t[3]))):(e=Pn(t,{r:0,g:0,b:0,a:1})).a=nn(e.a),e}function An(t){return"r"===t.charAt(0)?function(t){const e=Mn.exec(t);let n,i,s,o=255;if(e){if(e[7]!==n){const t=+e[7];o=e[8]?en(t):tn(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?en(n):tn(n,0,255)),i=255&(e[4]?en(i):tn(i,0,255)),s=255&(e[6]?en(s):tn(s,0,255)),{r:n,g:i,b:s,a:o}}}(t):vn(t)}class En{constructor(t){if(t instanceof En)return t;const e=typeof t;let n;var i,s,o;"object"===e?n=On(t):"string"===e&&(o=(i=t).length,"#"===i[0]&&(4===o||5===o?s={r:255&17*rn[i[1]],g:255&17*rn[i[2]],b:255&17*rn[i[3]],a:5===o?17*rn[i[4]]:255}:7!==o&&9!==o||(s={r:rn[i[1]]<<4|rn[i[2]],g:rn[i[3]]<<4|rn[i[4]],b:rn[i[5]]<<4|rn[i[6]],a:9===o?rn[i[7]]<<4|rn[i[8]]:255})),n=s||Cn(t)||An(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Pn(this._rgb);return t&&(t.a=sn(t.a)),t}set rgb(t){this._rgb=On(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${sn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=un(t)?ln:cn,t?"#"+e(t.r)+e(t.g)+e(t.b)+dn(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=bn(t),n=e[0],i=on(e[1]),s=on(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${sn(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let s;const o=e===s?.5:e,r=2*o-1,a=n.a-i.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;s=1-l,n.r=255&l*n.r+s*i.r+.5,n.g=255&l*n.g+s*i.g+.5,n.b=255&l*n.b+s*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Ln(sn(t.r)),s=Ln(sn(t.g)),o=Ln(sn(t.b));return{r:nn(Sn(i+n*(Ln(sn(e.r))-i))),g:nn(Sn(s+n*(Ln(sn(e.g))-s))),b:nn(Sn(o+n*(Ln(sn(e.b))-o))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new En(this.rgb)}alpha(t){return this._rgb.a=nn(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Qe(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Dn(this._rgb,2,t),this}darken(t){return Dn(this._rgb,2,-t),this}saturate(t){return Dn(this._rgb,1,t),this}desaturate(t){return Dn(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=bn(t);n[0]=_n(n[0]+e),n=yn(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Tn(t){return new En(t)}function Rn(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function zn(t){return Rn(t)?t:Tn(t)}function In(t){return Rn(t)?t:Tn(t).saturate(.5).darken(.1).hexString()}const Fn=Object.create(null),Nn=Object.create(null);function jn(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Bn(t,e,n){return"string"==typeof e?se(jn(t,e),n):se(jn(t,""),e)}var Vn=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>In(e.backgroundColor),this.hoverBorderColor=(t,e)=>In(e.borderColor),this.hoverColor=(t,e)=>In(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Bn(this,t,e)}get(t){return jn(this,t)}describe(t,e){return Bn(Nn,t,e)}override(t,e){return Bn(Fn,t,e)}route(t,e,n,i){const s=jn(this,t),o=jn(this,n),r="_"+e;Object.defineProperties(s,{[r]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[i];return Yt(t)?Object.assign({},e,t):Gt(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Hn(t,e,n,i,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,n.push(s)),o>i&&(i=o),i}function Wn(t,e,n,i){let s=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let r=0;const a=n.length;let l,c,h,u,d;for(l=0;l<a;l++)if(u=n[l],null!=u&&!0!==qt(u))r=Hn(t,s,o,r,u);else if(qt(u))for(c=0,h=u.length;c<h;c++)d=u[c],null==d||qt(d)||(r=Hn(t,s,o,r,d));t.restore();const f=o.length/2;if(f>n.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Un(t,e,n){const i=t.currentDevicePixelRatio,s=0!==n?Math.max(n/2,.5):0;return Math.round((e-s)*i)/i+s}function qn(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Yn(t,e,n,i){!function(t,e,n,i,s){let o,r,a,l,c,h;const u=e.pointStyle,d=e.rotation,f=e.radius;let p=(d||0)*be;if(u&&"object"==typeof u&&(o=u.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(n,i),t.rotate(p),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(isNaN(f)||f<=0)return;switch(t.beginPath(),u){default:s?t.ellipse(n,i,s/2,f,0,0,pe):t.arc(n,i,f,0,pe),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(p)*f,i-Math.cos(p)*f),p+=_e,t.lineTo(n+Math.sin(p)*f,i-Math.cos(p)*f),p+=_e,t.lineTo(n+Math.sin(p)*f,i-Math.cos(p)*f),t.closePath();break;case"rectRounded":c=.516*f,l=f-c,r=Math.cos(p+ye)*l,a=Math.sin(p+ye)*l,t.arc(n-r,i-a,c,p-fe,p-xe),t.arc(n+a,i-r,c,p-xe,p),t.arc(n+r,i+a,c,p,p+xe),t.arc(n-a,i+r,c,p+xe,p+fe),t.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*f,h=s?s/2:l,t.rect(n-h,i-l,2*h,2*l);break}p+=ye;case"rectRot":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(n-r,i-a),t.lineTo(n+a,i-r),t.lineTo(n+r,i+a),t.lineTo(n-a,i+r),t.closePath();break;case"crossRot":p+=ye;case"cross":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(n-r,i-a),t.lineTo(n+r,i+a),t.moveTo(n+a,i-r),t.lineTo(n-a,i+r);break;case"star":r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(n-r,i-a),t.lineTo(n+r,i+a),t.moveTo(n+a,i-r),t.lineTo(n-a,i+r),p+=ye,r=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(n-r,i-a),t.lineTo(n+r,i+a),t.moveTo(n+a,i-r),t.lineTo(n-a,i+r);break;case"line":r=s?s/2:Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(n-r,i-a),t.lineTo(n+r,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(p)*f,i+Math.sin(p)*f)}t.fill(),e.borderWidth>0&&t.stroke()}(t,e,n,i,null)}function Zn(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Xn(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Gn(t){t.restore()}function Kn(t,e,n,i,s){if(!e)return t.lineTo(n.x,n.y);if("middle"===s){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===s!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Jn(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Qn(t,e,n,i,s,o={}){const r=qt(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);Ut(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<r.length;++l)c=r[l],a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Ut(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,n,i,o.maxWidth)),t.fillText(c,n,i,o.maxWidth),ti(t,n,i,c,o),i+=s.lineHeight;t.restore()}function ti(t,e,n,i,s){if(s.strikethrough||s.underline){const o=t.measureText(i),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(r,h),t.lineTo(a,h),t.stroke()}}function ei(t,e){const{x:n,y:i,w:s,h:o,radius:r}=e;t.arc(n+r.topLeft,i+r.topLeft,r.topLeft,-xe,fe,!0),t.lineTo(n,i+o-r.bottomLeft),t.arc(n+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,fe,xe,!0),t.lineTo(n+s-r.bottomRight,i+o),t.arc(n+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,xe,0,!0),t.lineTo(n+s,i+r.topRight),t.arc(n+s-r.topRight,i+r.topRight,r.topRight,0,-xe,!0),t.lineTo(n+r.topLeft,i)}const ni=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ii=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function si(t,e){const n=(""+t).match(ni);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const oi=t=>+t||0;function ri(t,e){const n={},i=Yt(e),s=i?Object.keys(e):e,o=Yt(t)?i?n=>Gt(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of s)n[t]=oi(o(t));return n}function ai(t){return ri(t,{top:"y",right:"x",bottom:"y",left:"x"})}function li(t){return ri(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ci(t){const e=ai(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function hi(t,e){t=t||{},e=e||Vn.font;let n=Gt(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=Gt(t.style,e.style);i&&!(""+i).match(ii)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Gt(t.family,e.family),lineHeight:si(Gt(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:Gt(t.weight,e.weight),string:""};return s.string=function(t){return!t||Ut(t.size)||Ut(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function ui(t,e,n,i){let s,o,r,a=!0;for(s=0,o=t.length;s<o;++s)if(r=t[s],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==n&&qt(r)&&(r=r[n%r.length],a=!1),void 0!==r))return i&&!a&&(i.cacheable=!1),r}function di(t,e){return Object.assign(Object.create(t),e)}function fi(t,e=[""],n=t,i,s=(()=>t[0])){he(i)||(i=wi("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:s,override:s=>fi([s,...t],e,n,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>xi(n,i,(()=>function(t,e,n,i){let s;for(const o of e)if(s=wi(mi(o,t),n),he(s))return bi(t,s)?$i(n,i,t,s):s}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ci(t).includes(e),ownKeys:t=>Ci(t),set(t,e,n){const i=t._storage||(t._storage=s());return t[e]=i[e]=n,delete t._keys,!0}})}function pi(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:gi(t,i),setContext:e=>pi(t,e,n,i),override:s=>pi(t.override(s),e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>xi(t,e,(()=>function(t,e,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=t;let a=i[e];ue(a)&&r.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,r||i),a.delete(t),bi(t,e)&&(e=$i(s._scopes,s,t,e));return e}(e,a,t,n));qt(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=n;if(he(o.index)&&i(t))e=e[o.index%e.length];else if(Yt(e[0])){const n=e,i=s._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=$i(i,s,t,l);e.push(pi(n,o,r&&r[t],a))}}return e}(e,a,t,r.isIndexable));bi(e,a)&&(a=pi(a,s,o&&o[e],r));return a}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function gi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:ue(n)?n:()=>n,isIndexable:ue(i)?i:()=>i}}const mi=(t,e)=>t?t+ce(e):e,bi=(t,e)=>Yt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function xi(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function yi(t,e,n){return ue(t)?t(e,n):t}const _i=(t,e)=>!0===t?e:"string"==typeof t?le(e,t):void 0;function vi(t,e,n,i,s){for(const o of e){const e=_i(n,o);if(e){t.add(e);const o=yi(e._fallback,n,s);if(he(o)&&o!==n&&o!==i)return o}else if(!1===e&&he(i)&&n!==i)return null}return!1}function $i(t,e,n,i){const s=e._rootScopes,o=yi(e._fallback,n,i),r=[...t,...s],a=new Set;a.add(i);let l=ki(a,r,n,o||n,i);return null!==l&&((!he(o)||o===n||(l=ki(a,r,o,l,i),null!==l))&&fi(Array.from(a),[""],s,o,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];if(qt(s)&&Yt(n))return n;return s}(e,n,i))))}function ki(t,e,n,i,s){for(;n;)n=vi(t,e,n,i,s);return n}function wi(t,e){for(const n of e){if(!n)continue;const e=n[t];if(he(e))return e}}function Ci(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Mi(t,e,n,i){const{iScale:s}=t,{key:o="r"}=this._parsing,r=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a)c=a+n,h=e[c],r[a]={r:s.parse(le(h,o),c)};return r}const Si=Number.EPSILON||1e-14,Li=(t,e)=>e<t.length&&!t[e].skip&&t[e],Di=t=>"x"===t?"y":"x";function Pi(t,e,n,i){const s=t.skip?e:t,o=e,r=n.skip?e:n,a=Oe(o,s),l=Oe(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=i*c,d=i*h;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+d*(r.x-s.x),y:o.y+d*(r.y-s.y)}}}function Oi(t,e="x"){const n=Di(e),i=t.length,s=Array(i).fill(0),o=Array(i);let r,a,l,c=Li(t,0);for(r=0;r<i;++r)if(a=l,l=c,c=Li(t,r+1),l){if(c){const t=c[e]-l[e];s[r]=0!==t?(c[n]-l[n])/t:0}o[r]=a?c?$e(s[r-1])!==$e(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}!function(t,e,n){const i=t.length;let s,o,r,a,l,c=Li(t,0);for(let h=0;h<i-1;++h)l=c,c=Li(t,h+1),l&&c&&(Ce(e[h],0,Si)?n[h]=n[h+1]=0:(s=n[h]/e[h],o=n[h+1]/e[h],a=Math.pow(s,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),n[h]=s*r*e[h],n[h+1]=o*r*e[h])))}(t,s,o),function(t,e,n="x"){const i=Di(n),s=t.length;let o,r,a,l=Li(t,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Li(t,c+1),!a)continue;const s=a[n],h=a[i];r&&(o=(s-r[n])/3,a[`cp1${n}`]=s-o,a[`cp1${i}`]=h-o*e[c]),l&&(o=(l[n]-s)/3,a[`cp2${n}`]=s+o,a[`cp2${i}`]=h+o*e[c])}}(t,o,e)}function Ai(t,e,n){return Math.max(Math.min(t,n),e)}function Ei(t,e,n,i,s){let o,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Oi(t,s);else{let n=i?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=Pi(n,a,t[Math.min(o+1,r-(i?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,n=a}e.capBezierPoints&&function(t,e){let n,i,s,o,r,a=Zn(t[0],e);for(n=0,i=t.length;n<i;++n)r=o,o=a,a=n<i-1&&Zn(t[n+1],e),o&&(s=t[n],r&&(s.cp1x=Ai(s.cp1x,e.left,e.right),s.cp1y=Ai(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Ai(s.cp2x,e.left,e.right),s.cp2y=Ai(s.cp2y,e.top,e.bottom)))}(t,n)}function Ti(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ri(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function zi(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const Ii=t=>window.getComputedStyle(t,null);const Fi=["top","right","bottom","left"];function Ni(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=Fi[s];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ji=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Bi(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Ii(n),o="border-box"===s.boxSizing,r=Ni(s,"padding"),a=Ni(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:o}=i;let r,a,l=!1;if(ji(s,o,t.target))r=s,a=o;else{const t=e.getBoundingClientRect();r=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,n),u=r.left+(h&&a.left),d=r.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-u)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}const Vi=t=>Math.round(10*t)/10;function Hi(t,e,n,i){const s=Ii(t),o=Ni(s,"margin"),r=zi(s.maxWidth,t,"clientWidth")||me,a=zi(s.maxHeight,t,"clientHeight")||me,l=function(t,e,n){let i,s;if(void 0===e||void 0===n){const o=Ri(t);if(o){const t=o.getBoundingClientRect(),r=Ii(o),a=Ni(r,"border","width"),l=Ni(r,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=zi(r.maxWidth,o,"clientWidth"),s=zi(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||me,maxHeight:s||me}}(t,e,n);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=Ni(s,"border","width"),e=Ni(s,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,i?Math.floor(c/i):h-o.height),c=Vi(Math.min(c,r,l.maxWidth)),h=Vi(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Vi(c/2)),{width:c,height:h}}function Wi(t,e,n){const i=e||1,s=Math.floor(t.height*i),o=Math.floor(t.width*i);t.height=s/i,t.width=o/i;const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||r.height!==s||r.width!==o)&&(t.currentDevicePixelRatio=i,r.height=s,r.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ui=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function qi(t,e){const n=function(t,e){return Ii(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Yi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Zi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function Xi(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=Yi(t,s,n),a=Yi(s,o,n),l=Yi(o,e,n),c=Yi(r,a,n),h=Yi(a,l,n);return Yi(c,h,n)}const Gi=new Map;function Ki(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Gi.get(n);return i||(i=new Intl.NumberFormat(t,e),Gi.set(n,i)),i}(e,n).format(t)}const Ji=function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}},Qi=function(){return{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}};function ts(t,e,n){return t?Ji(e,n):Qi()}function es(t){return"angle"===t?{between:Te,compare:Ae,normalize:Ee}:{between:ze,compare:(t,e)=>t-e,normalize:t=>t}}function ns({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:s}}function is(t,e,n){if(!n)return[t];const{property:i,start:s,end:o}=n,r=e.length,{compare:a,between:l,normalize:c}=es(i),{start:h,end:u,loop:d,style:f}=function(t,e,n){const{property:i,start:s,end:o}=n,{between:r,normalize:a}=es(i),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;c<h&&r(a(e[u%l][i]),s,o);++c)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}(t,e,n),p=[];let g,m,b,x=!1,y=null;const _=()=>x||l(s,b,g)&&0!==a(s,b),v=()=>!x||0===a(o,g)||l(o,b,g);for(let t=h,n=h;t<=u;++t)m=e[t%r],m.skip||(g=c(m[i]),g!==b&&(x=l(g,s,o),null===y&&_()&&(y=0===a(g,s)?t:n),null!==y&&v()&&(p.push(ns({start:y,end:t,loop:d,count:r,style:f})),y=null),n=t,b=g));return null!==y&&p.push(ns({start:y,end:u,loop:d,count:r,style:f})),p}function ss(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const s=t._chart.getContext(),o=os(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=n.length,c=[];let h=o,u=e[0].start,d=u;function f(t,e,i,s){const o=a?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=o;for(;n[e%l].skip;)e+=o;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:i,style:s}),h=s,u=e%l)}}for(const t of e){u=a?u:t.start;let e,o=n[u%l];for(d=u+1;d<=t.end;d++){const a=n[d%l];e=os(i.setContext(di(s,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),rs(e,h)&&f(u,d-1,t.loop,h),o=a,h=e}u<d-1&&f(u,d-1,t.loop,h)}return c}(t,e,n,i):e}function os(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function rs(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/var as=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const s=e.listeners[i],o=e.duration;s.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=He.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const s=n.items;let o,r=s.length-1,a=!1;for(;r>=0;--r)o=s[r],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),a=!0):(s[r]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),s.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ls="transparent",cs={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=zn(t||ls),s=i.valid&&zn(e||ls);return s&&s.valid?s.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class hs{constructor(t,e,n,i){const s=e[n];i=ui([t.to,i,s,t.from]);const o=ui([t.from,s,i]);this._active=!0,this._fn=t.fn||cs[t.type||typeof o],this._easing=Je[t.easing]||Je.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ui([t.to,e,i,t.from]),this._from=ui([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||e<n),!this._active)return this._target[i]=r,void this._notify(!0);e<0?this._target[i]=s:(a=e/n%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(s,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}Vn.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const us=Object.keys(Vn.animation);Vn.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Vn.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Vn.describe("animations",{_fallback:"animation"}),Vn.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class ds{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Yt(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((n=>{const i=t[n];if(!Yt(i))return;const s={};for(const t of us)s[t]=i[t];(qt(i.properties)&&i.properties||[n]).forEach((t=>{t!==n&&e.has(t)||e.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!i)return[];const s=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const s=t[i[e]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),s}_createAnimations(t,e){const n=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let h=s[l];const u=n.get(l);if(h){if(u&&h.active()){h.update(u,c,r);continue}h.cancel()}u&&u.duration?(s[l]=h=new hs(u,t,l,c),i.push(h)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(as.add(this._chart,n),!0):void 0}}function fs(t,e){const n=t&&t.options||{},i=n.reverse,s=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:i?o:s,end:i?s:o}}function ps(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=i.length;s<o;++s)n.push(i[s].index);return n}function gs(t,e,n,i={}){const s=t.keys,o="single"===i.mode;let r,a,l,c;if(null!==e){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===n){if(i.all)continue;break}c=t.values[l],Zt(c)&&(o||0===e||$e(e)===$e(c))&&(e+=c)}return e}}function ms(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function bs(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function xs(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const e=t[s.index];if(n&&e>0||!n&&e<0)return s.index}return null}function ys(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=i,l=o.axis,c=r.axis,h=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(o,r,i),u=e.length;let d;for(let t=0;t<u;++t){const n=e[t],{[l]:o,[c]:u}=n;d=(n._stacks||(n._stacks={}))[c]=bs(s,h,o),d[a]=u,d._top=xs(d,r,!0,i.type),d._bottom=xs(d,r,!1,i.type)}}function _s(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function vs(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n]}}}const $s=t=>"reset"===t||"none"===t,ks=(t,e)=>e?t:Object.assign({},t);class ws{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ms(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&vs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,s=e.xAxisID=Gt(n.xAxisID,_s(t,"x")),o=e.yAxisID=Gt(n.yAxisID,_s(t,"y")),r=e.rAxisID=Gt(n.rAxisID,_s(t,"r")),a=e.indexAxis,l=e.iAxisID=i(a,s,o,r),c=e.vAxisID=i(a,o,s,r);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Be(this._data,this),t._stacked&&vs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Yt(e))this._data=function(t){const e=Object.keys(t),n=new Array(e.length);let i,s,o;for(i=0,s=e.length;i<s;++i)o=e[i],n[i]={x:o,y:t[o]};return n}(e);else if(n!==e){if(n){Be(n,this);const t=this._cachedMeta;vs(t),t._parsed=[]}e&&Object.isExtensible(e)&&(s=this,(i=e)._chartjs?i._chartjs.listeners.push(s):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[s]}}),je.forEach((t=>{const e="_onData"+ce(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const s=n.apply(this,t);return i._chartjs.listeners.forEach((n=>{"function"==typeof n[e]&&n[e](...t)})),s}})})))),this._syncList=[],this._data=e}var i,s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const s=e._stacked;e._stacked=ms(e.vScale,e),e.stack!==n.stack&&(i=!0,vs(e),e.stack=n.stack),this._resyncElements(t),(i||s!==e._stacked)&&ys(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:s,_stacked:o}=n,r=s.axis;let a,l,c,h=0===t&&e===i.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=qt(i[t])?this.parseArrayData(n,i,t,e):Yt(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const s=()=>null===l[r]||u&&l[r]<u[r];for(a=0;a<e;++a)n._parsed[a+t]=l=c[a],h&&(s()&&(h=!1),u=l);n._sorted=h}o&&ys(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:s,vScale:o}=t,r=s.axis,a=o.axis,l=s.getLabels(),c=s===o,h=new Array(i);let u,d,f;for(u=0,d=i;u<d;++u)f=u+n,h[u]={[r]:c||s.parse(l[f],f),[a]:o.parse(e[f],f)};return h}parseArrayData(t,e,n,i){const{xScale:s,yScale:o}=t,r=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a)c=a+n,h=e[c],r[a]={x:s.parse(h[0],c),y:o.parse(h[1],c)};return r}parseObjectData(t,e,n,i){const{xScale:s,yScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(i);let c,h,u,d;for(c=0,h=i;c<h;++c)u=c+n,d=e[u],l[c]={x:s.parse(le(d,r),u),y:o.parse(le(d,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,s=this._cachedMeta,o=e[t.axis];return gs({keys:ps(i,!0),values:e._stacks[t.axis]},o,s.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const s=n[e.axis];let o=null===s?NaN:s;const r=i&&n._stacks[e.axis];i&&r&&(i.values=r,o=gs(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,s=n._sorted&&t===n.iScale,o=i.length,r=this._getOtherScale(t),a=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:ps(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}(r);let u,d;function f(){d=i[u];const e=d[r.axis];return!Zt(d[t.axis])||c>e||h<e}for(u=0;u<o&&(f()||(this.updateRangeFromParsed(l,t,d,a),!s));++u);if(s)for(u=o-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,s,o;for(i=0,s=e.length;i<s;++i)o=e[i][t.axis],Zt(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,s=this.getParsed(t);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,s;return Yt(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:!1===t}}(Gt(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=fs(t,n),s=fs(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],s=e.chartArea,o=[],r=this._drawStart||0,a=this._drawCount||i.length-r,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,s,r,a),c=r;c<r+a;++c){const e=i[c];e.hidden||(e.active&&l?o.push(e):e.draw(t,s))}for(c=0;c<o.length;++c)o[c].draw(t,s)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,n){return di(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return di(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=n,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,s=this._cachedDataOpts,o=t+"-"+e,r=s[o],a=this.enableOptionSharing&&he(n);if(r)return ks(r,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),c),d=Object.keys(Vn.elements[t]),f=l.resolveNamedOptions(u,d,(()=>this.getContext(n,i)),h);return f.$shared&&(f.$shared=a,s[o]=Object.freeze(ks(f,a))),f}_resolveAnimations(t,e,n){const i=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,r=s[o];if(r)return r;let a;if(!1!==i.options.animation){const i=this.chart.config,s=i.datasetAnimationScopeKeys(this._type,e),o=i.getOptionScopes(this.getDataset(),s);a=i.createResolver(o,this.getContext(t,n,e))}const l=new ds(i,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||$s(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,s=this.getSharedOptions(n),o=this.includeOptions(e,s)||s!==i;return this.updateSharedOptions(s,e,n),{sharedOptions:s,includeOptions:o}}updateElement(t,e,n,i){$s(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!$s(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const s=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,s=e.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,e,n=!0){const i=this._cachedMeta,s=i.data,o=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(a(s),r=t;r<o;++r)s[r]=new this.dataElementType;this._parsing&&a(i._parsed),this.parse(t,e),n&&this.updateElements(s,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&vs(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Cs(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,s=n.length;e<s;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=Ve(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let i,s,o,r,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(he(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(i=0,s=n.length;i<s;++i)o=e.getPixelForValue(n[i]),l();for(r=void 0,i=0,s=e.ticks.length;i<s;++i)o=e.getPixelForTick(i),l();return a}function Ms(t,e,n,i){return qt(t)?function(t,e,n,i){const s=n.parse(t[0],i),o=n.parse(t[1],i),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Ss(t,e,n,i){const s=t.iScale,o=t.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,u,d;for(c=n,h=n+i;c<h;++c)d=e[c],u={},u[s.axis]=a||s.parse(r[c],c),l.push(Ms(d,u,o,c));return l}function Ls(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Ds(t,e,n,i){let s=e.borderSkipped;const o={};if(!s)return void(t.borderSkipped=o);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:c,bottom:h}=function(t){let e,n,i,s,o;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",o="start"):(s="start",o="end"),{start:n,end:i,reverse:e,top:s,bottom:o}}(t);"middle"===s&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=c:(n._bottom||0)===i?s=h:(o[Ps(h,r,a,l)]=!0,s=c)),o[Ps(s,r,a,l)]=!0,t.borderSkipped=o}function Ps(t,e,n,i){var s,o,r;return i?(r=n,t=Os(t=(s=t)===(o=e)?r:s===r?o:s,n,e)):t=Os(t,e,n),t}function Os(t,e,n){return"start"===t?e:"end"===t?n:t}function As(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}ws.defaults={},ws.prototype.datasetElementType=null,ws.prototype.dataElementType=null;class Es extends ws{parsePrimitiveData(t,e,n,i){return Ss(t,e,n,i)}parseArrayData(t,e,n,i){return Ss(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:s,vScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===s.axis?r:a,c="x"===o.axis?r:a,h=[];let u,d,f,p;for(u=n,d=n+i;u<d;++u)p=e[u],f={},f[s.axis]=s.parse(le(p,l),u),h.push(Ms(le(p,c),f,o,u));return h}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const s=n._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,s=this.getParsed(t),o=s._custom,r=Ls(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+n.getLabelForValue(s[n.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const s="reset"===i,{index:o,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,i);for(let d=e;d<e+n;d++){const e=this.getParsed(d),n=s||Ut(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,c),p=(e._stacks||{})[r.axis],g={horizontal:l,base:n.base,enableBorderRadius:!p||Ls(e._custom)||o===p._top||o===p._bottom,x:l?n.head:f.center,y:l?f.center:n.head,height:l?f.size:Math.abs(n.size),width:l?Math.abs(n.size):f.size};u&&(g.options=h||this.resolveDataElementOptions(d,t[d].active?"active":i));const m=g.options||t[d].options;Ds(g,m,p,o),As(g,m,c.ratio),this.updateElement(t[d],d,g,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),s=n.options.stacked,o=[],r=t=>{const n=t.controller.getParsed(e),i=n&&n[t.vScale.axis];if(Ut(i)||isNaN(i))return!0};for(const n of i)if((void 0===e||!r(n))&&((!1===s||-1===o.indexOf(n.stack)||void 0===s&&void 0===n.stack)&&o.push(n.stack),n.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),s=void 0!==e?i.indexOf(e):-1;return-1===s?i.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let s,o;for(s=0,o=e.data.length;s<o;++s)i.push(n.getPixelForValue(this.getParsed(s)[n.axis],s));const r=t.barThickness;return{min:r||Cs(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n},options:{base:i,minBarLength:s}}=this,o=i||0,r=this.getParsed(t),a=r._custom,l=Ls(a);let c,h,u=r[e.axis],d=0,f=n?this.applyStack(e,r,n):u;f!==u&&(d=f-u,f=u),l&&(u=a.barStart,f=a.barEnd-a.barStart,0!==u&&$e(u)!==$e(a.barEnd)&&(d=0),d+=u);const p=Ut(i)||l?d:i;let g=e.getPixelForValue(p);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(d+f):g,h=c-g,Math.abs(h)<s){h=function(t,e,n){return 0!==t?$e(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,o)*s,u===o&&(g-=h/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),i=Math.min(t,n),r=Math.max(t,n);g=Math.max(Math.min(g,r),i),c=g+h}if(g===e.getPixelForValue(o)){const t=$e(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,s=i.skipNull,o=Gt(i.maxBarThickness,1/0);let r,a;if(e.grouped){const n=s?this._getStackCount(t):e.stackCount,l="flex"===i.barThickness?function(t,e,n,i){const s=e.pixels,o=s[t];let r=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=n.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n):function(t,e,n,i){const s=n.barThickness;let o,r;return Ut(s)?(o=e.min*n.categoryPercentage,r=n.barPercentage):(o=s*i,r=1),{chunk:o/i,ratio:r,start:e.pixels[t]-o/2}}(t,e,i,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);r=l.start+l.chunk*c+l.chunk/2,a=Math.min(o,l.chunk*l.ratio)}else r=n.getPixelForValue(this.getParsed(t)[n.axis],t),a=Math.min(o,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let s=0;for(;s<i;++s)null!==this.getParsed(s)[e.axis]&&n[s].draw(this._ctx)}}Es.id="bar",Es.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Es.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Ts extends ws{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const s=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+n).radius;return s}parseArrayData(t,e,n,i){const s=super.parseArrayData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=Gt(i[2],this.resolveDataElementOptions(t+n).radius)}return s}parseObjectData(t,e,n,i){const s=super.parseObjectData(t,e,n,i);for(let t=0;t<s.length;t++){const i=e[n+t];s[t]._custom=Gt(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:n,yScale:i}=e,s=this.getParsed(t),o=n.getLabelForValue(s.x),r=i.getLabelForValue(s.y),a=s._custom;return{label:e.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,i),c=o.axis,h=r.axis;for(let u=e;u<e+n;u++){const e=t[u],n=!s&&this.getParsed(u),d={},f=d[c]=s?o.getPixelForDecimal(.5):o.getPixelForValue(n[c]),p=d[h]=s?r.getBasePixel():r.getPixelForValue(n[h]);d.skip=isNaN(f)||isNaN(p),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":i),s&&(d.options.radius=0)),this.updateElement(e,u,d,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return"active"!==e&&(i.radius=0),i.radius+=Gt(n&&n._custom,s),i}}Ts.id="bubble",Ts.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Ts.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Rs extends ws{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let s,o,r=t=>+n[t];if(Yt(n[t])){const{key:t="value"}=this._parsing;r=e=>+le(n[e],t)}for(s=t,o=t+e;s<o;++s)i._parsed[s]=r(s)}}_getRotation(){return Se(this.options.rotation-90)}_getCircumference(){return Se(this.options.circumference)}_getRotationExtents(){let t=pe,e=-pe;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)){const i=this.chart.getDatasetMeta(n).controller,s=i._getRotation(),o=i._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-o)/2,0),a=Math.min((l=this.options.cutout,c=r,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:l/c),1);var l,c;const h=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,n){let i=1,s=1,o=0,r=0;if(e<pe){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),d=Math.sin(l),f=(t,e,i)=>Te(t,a,l,!0)?1:Math.max(e,e*n,i,i*n),p=(t,e,i)=>Te(t,a,l,!0)?-1:Math.min(e,e*n,i,i*n),g=f(0,c,u),m=f(xe,h,d),b=p(fe,c,u),x=p(fe+xe,h,d);i=(g-b)/2,s=(m-x)/2,o=-(g+b)/2,r=-(m+x)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:r}}(d,u,a),b=(n.width-o)/f,x=(n.height-o)/p,y=Math.max(Math.min(b,x)/2,0),_=Kt(this.options.radius,y),v=(_-Math.max(_*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,i.total=this.calculateTotal(),this.outerRadius=_-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,s=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/pe)}updateElements(t,e,n,i){const s="reset"===i,o=this.chart,r=o.chartArea,a=o.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=s&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,i);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,s);for(g=e;g<e+n;++g){const e=this._circumference(g,s),n=t[g],o={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:u};p&&(o.options=f||this.resolveDataElementOptions(g,n.active?"active":i)),m+=e,this.updateElement(n,g,o,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const s=t._parsed[n];null===s||isNaN(s)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(s))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?pe*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=Ki(e._parsed[t],n.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,s,o,r,a;if(!t)for(i=0,s=n.data.datasets.length;i<s;++i)if(n.isDatasetVisible(i)){o=n.getDatasetMeta(i),t=o.data,r=o.controller;break}if(!t)return 0;for(i=0,s=t.length;i<s;++i)a=r.resolveDataElementOptions(i),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(Gt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Rs.id="doughnut",Rs.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Rs.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},Rs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map(((e,i)=>{const s=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const n=": "+t.formattedValue;return qt(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};class zs extends ws{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:r,count:a}=Ye(e,i,o);this._drawStart=r,this._drawCount=a,Ze(e)&&(r=0,a=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!s._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:l},t),this.updateElements(i,r,a,t)}updateElements(t,e,n,i){const s="reset"===i,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,i),u=o.axis,d=r.axis,{spanGaps:f,segment:p}=this.options,g=we(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===i;let b=e>0&&this.getParsed(e-1);for(let f=e;f<e+n;++f){const e=t[f],n=this.getParsed(f),x=m?e:{},y=Ut(n[d]),_=x[u]=o.getPixelForValue(n[u],f),v=x[d]=s||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,n,a):n[d],f);x.skip=isNaN(_)||isNaN(v)||y,x.stop=f>0&&Math.abs(n[u]-b[u])>g,p&&(x.parsed=n,x.raw=l.data[f]),h&&(x.options=c||this.resolveDataElementOptions(f,e.active?"active":i)),m||this.updateElement(e,f,x,i),b=n}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}zs.id="line",zs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},zs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Is extends ws{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],s=Ki(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,n,i){return Mi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(i/2,0),o=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,n,i){const s="reset"===i,o=this.chart,r=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,h=a.getIndexAngle(0)-.5*fe;let u,d=h;const f=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,i,f);for(u=e;u<e+n;u++){const e=t[u];let n=d,p=d+this._computeAngle(u,i,f),g=o.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=p,s&&(r.animateScale&&(g=0),r.animateRotate&&(n=p=h));const m={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(u,e.active?"active":i)};this.updateElement(e,u,m,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++})),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?Se(this.resolveDataElementOptions(t,e).angle||n):0}}Is.id="polarArea",Is.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Is.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map(((e,i)=>{const s=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(i),index:i}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Fs extends Rs{}Fs.id="pie",Fs.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ns extends ws{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return Mi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],s=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===i.length,options:e};this.updateElement(n,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const s=this._cachedMeta.rScale,o="reset"===i;for(let r=e;r<e+n;r++){const e=t[r],n=this.resolveDataElementOptions(r,e.active?"active":i),a=s.getPointPositionForValue(r,this.getParsed(r).r),l=o?s.xCenter:a.x,c=o?s.yCenter:a.y,h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,r,h,i)}}}Ns.id="radar",Ns.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Ns.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class js{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return we(this.x)&&we(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}js.defaults={},js.defaultRoutes=void 0;const Bs={values:t=>qt(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let s,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const r=ve(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ki(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=t/Math.pow(10,Math.floor(ve(t)));return 1===i||2===i||5===i?Bs.numeric.call(this,t,e,n):""}};var Vs={formatters:Bs};function Hs(t,e){const n=t.options.ticks,i=n.maxTicksLimit||function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}(t),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=s.length,r=s[0],a=s[o-1],l=[];if(o>i)return function(t,e,n,i){let s,o=0,r=n[0];for(i=Math.ceil(i),s=0;s<t.length;s++)s===r&&(e.push(t[s]),o++,r=n[o*i])}(e,l,s,o/i),l;const c=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),s=e.length/n;if(!i)return Math.max(s,1);const o=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i==0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(((t,e)=>t-e)).pop(),e}(i);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>s)return e}return Math.max(s,1)}(s,e,i);if(o>0){let t,n;const i=o>1?Math.round((a-r)/(o-1)):null;for(Ws(e,l,c,Ut(i)?0:r-i,r),t=0,n=o-1;t<n;t++)Ws(e,l,c,s[t],s[t+1]);return Ws(e,l,c,a,Ut(i)?e.length:a+i),l}return Ws(e,l,c),l}function Ws(t,e,n,i,s){const o=Gt(i,0),r=Math.min(Gt(s,t.length),t.length);let a,l,c,h=0;for(n=Math.ceil(n),s&&(a=s-i,n=a/Math.floor(a/n)),c=o;c<0;)h++,c=Math.round(o+h*n);for(l=Math.max(o,0);l<r;l++)l===c&&(e.push(t[l]),h++,c=Math.round(o+h*n))}Vn.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Vn.route("scale.ticks","color","","color"),Vn.route("scale.grid","color","","borderColor"),Vn.route("scale.grid","borderColor","","borderColor"),Vn.route("scale.title","color","","color"),Vn.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Vn.describe("scales",{_fallback:"scale"}),Vn.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Us=t=>"left"===t?"right":"right"===t?"left":t,qs=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n;function Ys(t,e){const n=[],i=t.length/e,s=t.length;let o=0;for(;o<s;o+=i)n.push(t[Math.floor(o)]);return n}function Zs(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(s);if(!(n&&(l=1===i?Math.max(c-o,r-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<o-a||c>r+a)))return c}function Xs(t){return t.drawTicks?t.tickLength:0}function Gs(t,e){if(!t.display)return 0;const n=hi(t.font,e),i=ci(t.padding);return(qt(t.text)?t.text.length:1)*n.lineHeight+i.height}function Ks(t,e,n){let i=Ue(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=Us(i)),i}class Js extends js{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=Xt(t,Number.POSITIVE_INFINITY),e=Xt(e,Number.NEGATIVE_INFINITY),n=Xt(n,Number.POSITIVE_INFINITY),i=Xt(i,Number.NEGATIVE_INFINITY),{min:Xt(t,n),max:Xt(e,i),minDefined:Zt(t),maxDefined:Zt(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:n,max:i};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),s||(n=Math.min(n,e.min)),o||(i=Math.max(i,e.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:Xt(n,Xt(i,n)),max:Xt(i,Xt(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Jt(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:s}=t,o=Kt(e,(s-i)/2),r=(t,e)=>n&&0===t?0:t+e;return{min:r(i,-Math.abs(o)),max:r(s,o)}}(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Ys(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=Hs(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Jt(this.options.afterUpdate,[this])}beforeSetDimensions(){Jt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Jt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Jt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Jt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,s;for(n=0,i=t.length;n<i;n++)s=t[n],s.label=Jt(e.callback,[s.value,n,t],this)}afterTickToLabelConversion(){Jt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Jt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=this.ticks.length,i=e.minRotation||0,s=e.maxRotation;let o,r,a,l=i;if(!this._isVisible()||!e.display||i>=s||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=Re(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/n:d/(n-1),h+6>o&&(o=d/(n-(t.offset?.5:1)),r=this.maxHeight-Xs(t.grid)-e.padding-Gs(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=Le(Math.min(Math.asin(Re((c.highest.height+6)/o,-1,1)),Math.asin(Re(r/a,-1,1))-Math.asin(Re(u/a,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){Jt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Jt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const o=Gs(i,e.options.font);if(r?(t.width=this.maxWidth,t.height=Xs(s)+o):(t.height=this.maxHeight,t.width=Xs(s)+o),n.display&&this.ticks.length){const{first:e,last:i,widest:s,highest:o}=this._getLabelSizes(),a=2*n.padding,l=Se(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(r){const e=n.mirror?0:h*s.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=n.mirror?0:c*s.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,i,h,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:s,padding:o},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=i*t.width,u=n*e.height):(h=n*t.height,u=i*e.width):"start"===s?u=e.width:"end"===s?h=t.width:"inner"!==s&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-r+o)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===s?(n=0,i=t.height):"end"===s&&(n=e.height,i=0),this.paddingTop=n+o,this.paddingBottom=i+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Jt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Ut(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Ys(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length)}return t}_computeLabelSizes(t,e){const{ctx:n,_longestTextCache:i}=this,s=[],o=[];let r,a,l,c,h,u,d,f,p,g,m,b=0,x=0;for(r=0;r<e;++r){if(c=t[r].label,h=this._resolveTickFontOptions(r),n.font=u=h.string,d=i[u]=i[u]||{data:{},gc:[]},f=h.lineHeight,p=g=0,Ut(c)||qt(c)){if(qt(c))for(a=0,l=c.length;a<l;++a)m=c[a],Ut(m)||qt(m)||(p=Hn(n,d.data,d.gc,p,m),g+=f)}else p=Hn(n,d.data,d.gc,p,c),g=f;s.push(p),o.push(g),b=Math.max(p,b),x=Math.max(g,x)}!function(t,e){Qt(t,(t=>{const n=t.gc,i=n.length/2;let s;if(i>e){for(s=0;s<i;++s)delete t.data[n[s]];n.splice(0,i)}}))}(i,e);const y=s.indexOf(b),_=o.indexOf(x),v=t=>({width:s[t]||0,height:o[t]||0});return{first:v(0),last:v(e-1),widest:v(y),highest:v(_),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Re(this._alignToPixels?Un(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return di(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=di(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Se(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,r=s?s.widest.width+o:0,a=s?s.highest.height+o:0;return this.isHorizontal()?a*n>r*i?r/n:a/i:a*i<r*n?a/n:r/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:s,position:o}=i,r=s.offset,a=this.isHorizontal(),l=this.ticks.length+(r?1:0),c=Xs(s),h=[],u=s.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return Un(n,t,d)};let g,m,b,x,y,_,v,$,k,w,C,M;if("top"===o)g=p(this.bottom),_=this.bottom-c,$=g-f,w=p(t.top)+f,M=t.bottom;else if("bottom"===o)g=p(this.top),w=t.top,M=p(t.bottom)-f,_=g+f,$=this.top+c;else if("left"===o)g=p(this.right),y=this.right-c,v=g-f,k=p(t.left)+f,C=t.right;else if("right"===o)g=p(this.left),k=t.left,C=p(t.right)-f,y=g+f,v=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(Yt(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}w=t.top,M=t.bottom,_=g+f,$=_+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(Yt(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}y=g-f,v=y-c,k=t.left,C=t.right}const S=Gt(i.ticks.maxTicksLimit,l),L=Math.max(1,Math.ceil(l/S));for(m=0;m<l;m+=L){const t=s.setContext(this.getContext(m)),e=t.lineWidth,i=t.color,o=t.borderDash||[],l=t.borderDashOffset,c=t.tickWidth,u=t.tickColor,d=t.tickBorderDash||[],f=t.tickBorderDashOffset;b=Zs(this,m,r),void 0!==b&&(x=Un(n,b,e),a?y=v=k=C=x:_=$=w=M=x,h.push({tx1:y,ty1:_,tx2:v,ty2:$,x1:k,y1:w,x2:C,y2:M,width:e,color:i,borderDash:o,borderDashOffset:l,tickWidth:c,tickColor:u,tickBorderDash:d,tickBorderDashOffset:f}))}return this._ticksLength=l,this._borderValue=g,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:s}=n,o=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:c,mirror:h}=s,u=Xs(n.grid),d=u+c,f=h?-c:d,p=-Se(this.labelRotation),g=[];let m,b,x,y,_,v,$,k,w,C,M,S,L="middle";if("top"===i)v=this.bottom-f,$=this._getXAxisLabelAlignment();else if("bottom"===i)v=this.top+f,$=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(u);$=t.textAlign,_=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(u);$=t.textAlign,_=t.x}else if("x"===e){if("center"===i)v=(t.top+t.bottom)/2+d;else if(Yt(i)){const t=Object.keys(i)[0],e=i[t];v=this.chart.scales[t].getPixelForValue(e)+d}$=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)_=(t.left+t.right)/2-d;else if(Yt(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)}$=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?L="top":"end"===a&&(L="bottom"));const D=this._getLabelSizes();for(m=0,b=r.length;m<b;++m){x=r[m],y=x.label;const t=s.setContext(this.getContext(m));k=this.getPixelForTick(m)+s.labelOffset,w=this._resolveTickFontOptions(m),C=w.lineHeight,M=qt(y)?y.length:1;const e=M/2,n=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let u,d=$;if(o?(_=k,"inner"===$&&(d=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),S="top"===i?"near"===l||0!==p?-M*C+C/2:"center"===l?-D.highest.height/2-e*C+C:-D.highest.height+C/2:"near"===l||0!==p?C/2:"center"===l?D.highest.height/2-e*C:D.highest.height-M*C,h&&(S*=-1)):(v=k,S=(1-M)*C/2),t.showLabelBackdrop){const e=ci(t.backdropPadding),n=D.heights[m],i=D.widths[m];let s=v+S-e.top,o=_-e.left;switch(L){case"middle":s-=n/2;break;case"bottom":s-=n}switch($){case"center":o-=i/2;break;case"right":o-=i}u={left:o,top:s,width:i+e.width,height:n+e.height,color:t.backdropColor}}g.push({rotation:p,label:y,font:w,color:n,strokeColor:a,strokeWidth:c,textOffset:S,textAlign:d,textBaseline:L,translation:[_,v],backdrop:u})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Se(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:s}}=this.options,o=t+s,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?i?(l=this.right+s,"near"===n?a="left":"center"===n?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-o,"near"===n?a="right":"center"===n?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?i?(l=this.left+s,"near"===n?a="right":"center"===n?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+o,"near"===n?a="left":"center"===n?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex((e=>e.value===t));if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(s=0,o=i.length;s<o;++s){const t=i[s];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:n}}=this,i=n.setContext(this.getContext()),s=n.drawBorder?i.borderWidth:0;if(!s)return;const o=n.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let a,l,c,h;this.isHorizontal()?(a=Un(t,this.left,s)-s/2,l=Un(t,this.right,o)+o/2,c=h=r):(c=Un(t,this.top,s)-s/2,h=Un(t,this.bottom,o)+o/2,a=l=r),e.save(),e.lineWidth=i.borderWidth,e.strokeStyle=i.borderColor,e.beginPath(),e.moveTo(a,c),e.lineTo(l,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&Xn(e,n);const i=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,o;for(s=0,o=i.length;s<o;++s){const t=i[s],n=t.font,o=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),Qn(e,o,0,t.textOffset,n,t)}n&&Gn(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const s=hi(n.font),o=ci(n.padding),r=n.align;let a=s.lineHeight/2;"bottom"===e||"center"===e||Yt(e)?(a+=o.bottom,qt(n.text)&&(a+=s.lineHeight*(n.text.length-1))):a+=o.top;const{titleX:l,titleY:c,maxWidth:h,rotation:u}=function(t,e,n,i){const{top:s,left:o,bottom:r,right:a,chart:l}=t,{chartArea:c,scales:h}=l;let u,d,f,p=0;const g=r-s,m=a-o;if(t.isHorizontal()){if(d=qe(i,o,a),Yt(n)){const t=Object.keys(n)[0],i=n[t];f=h[t].getPixelForValue(i)+g-e}else f="center"===n?(c.bottom+c.top)/2+g-e:qs(t,n,e);u=a-o}else{if(Yt(n)){const t=Object.keys(n)[0],i=n[t];d=h[t].getPixelForValue(i)-m+e}else d="center"===n?(c.left+c.right)/2-m+e:qs(t,n,e);f=qe(i,r,s),p="left"===n?-xe:xe}return{titleX:d,titleY:f,maxWidth:u,rotation:p}}(this,a,e,r);Qn(t,n.text,0,0,s,{color:n.color,maxWidth:h,rotation:u,textAlign:Ks(r,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=Gt(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Js.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let s,o;for(s=0,o=e.length;s<o;++s){const o=e[s];o[n]!==this.id||t&&o.type!==t||i.push(o)}return i}_resolveTickFontOptions(t){return hi(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Qs{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,function(t,e,n){const i=se(Object.create(null),[n?Vn.get(n):{},Vn.get(e),t.defaults]);Vn.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((n=>{const i=n.split("."),s=i.pop(),o=[t].concat(i).join("."),r=e[n].split("."),a=r.pop(),l=r.join(".");Vn.route(o,s,l,a)}))}(e,t.defaultRoutes);t.descriptors&&Vn.describe(e,t.descriptors)}(t,o,n),this.override&&Vn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in Vn[i]&&(delete Vn[i][n],this.override&&delete Fn[n])}}var to=new class{constructor(){this.controllers=new Qs(ws,"datasets",!0),this.elements=new Qs(js,"elements"),this.plugins=new Qs(Object,"plugins"),this.scales=new Qs(Js,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):Qt(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const i=ce(t);Jt(n["before"+i],[],n),e[t](n),Jt(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}};class eo extends ws{update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:s,count:o}=Ye(e,n,i);if(this._drawStart=s,this._drawCount=o,Ze(e)&&(s=0,o=n.length),this.options.showLine){const{dataset:s,_dataset:o}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:r},t)}this.updateElements(n,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=to.getElement("line")),super.addElements()}updateElements(t,e,n,i){const s="reset"===i,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),h=this.getSharedOptions(c),u=this.includeOptions(i,h),d=o.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=we(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===i;let x=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){const e=t[c],n=this.getParsed(c),p=b?e:{},y=Ut(n[f]),_=p[d]=o.getPixelForValue(n[d],c),v=p[f]=s||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,n,a):n[f],c);p.skip=isNaN(_)||isNaN(v)||y,p.stop=c>0&&Math.abs(n[d]-x[d])>m,g&&(p.parsed=n,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":i)),b||this.updateElement(e,c,p,i),x=n}this.updateSharedOptions(h,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,s,o)/2}}function no(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}eo.id="scatter",eo.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},eo.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class io{constructor(t){this.options=t||{}}init(t){}formats(){return no()}parse(t,e){return no()}format(t,e){return no()}add(t,e,n){return no()}diff(t,e,n){return no()}startOf(t,e,n){return no()}endOf(t,e){return no()}}io.override=function(t){Object.assign(io.prototype,t)};var so={_date:io};function oo(t,e,n,i){const{controller:s,data:o,_sorted:r}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const t=a._reversePixels?Ne:Fe;if(!i)return t(o,e,n);if(s._sharedOptions){const i=o[0],s="function"==typeof i.getRange&&i.getRange(e);if(s){const i=t(o,e,n-s),r=t(o,e,n+s);return{lo:i.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}function ro(t,e,n,i,s){const o=t.getSortedVisibleDatasetMetas(),r=n[e];for(let t=0,n=o.length;t<n;++t){const{index:n,data:a}=o[t],{lo:l,hi:c}=oo(o[t],e,r,s);for(let t=l;t<=c;++t){const e=a[t];e.skip||i(e,n,t)}}}function ao(t,e,n,i,s){const o=[];if(!s&&!t.isPointInArea(e))return o;return ro(t,n,e,(function(n,r,a){(s||Zn(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&o.push({element:n,datasetIndex:r,index:a})}),!0),o}function lo(t,e,n,i,s,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const s=e?Math.abs(t.x-i.x):0,o=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}(n);let l=Number.POSITIVE_INFINITY;return ro(t,n,e,(function(n,c,h){const u=n.inRange(e.x,e.y,s);if(i&&!u)return;const d=n.getCenterPoint(s);if(!(!!o||t.isPointInArea(d))&&!u)return;const f=a(e,d);f<l?(r=[{element:n,datasetIndex:c,index:h}],l=f):f===l&&r.push({element:n,datasetIndex:c,index:h})})),r}function co(t,e,n,i,s,o){return o||t.isPointInArea(e)?"r"!==n||i?lo(t,e,n,i,s,o):function(t,e,n,i){let s=[];return ro(t,n,e,(function(t,n,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],i),{angle:l}=Pe(t,{x:e.x,y:e.y});Te(l,r,a)&&s.push({element:t,datasetIndex:n,index:o})})),s}(t,e,n,s):[]}function ho(t,e,n,i,s){const o=[],r="x"===n?"inXRange":"inYRange";let a=!1;return ro(t,n,e,((t,i,l)=>{t[r](e[n],s)&&(o.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,s))})),i&&!a?[]:o}var uo={evaluateInteractionItems:ro,modes:{index(t,e,n,i){const s=Bi(e,t),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?ao(t,s,o,i,r):co(t,s,o,!1,i,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,n,i){const s=Bi(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?ao(t,s,o,i,r):co(t,s,o,!1,i,r);if(a.length>0){const e=a[0].datasetIndex,n=t.getDatasetMeta(e).data;a=[];for(let t=0;t<n.length;++t)a.push({element:n[t],datasetIndex:e,index:t})}return a},point:(t,e,n,i)=>ao(t,Bi(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const s=Bi(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;return co(t,s,o,n.intersect,i,r)},x:(t,e,n,i)=>ho(t,Bi(e,t),"x",n.intersect,i),y:(t,e,n,i)=>ho(t,Bi(e,t),"y",n.intersect,i)}};const fo=["left","top","right","bottom"];function po(t,e){return t.filter((t=>t.pos===e))}function go(t,e){return t.filter((t=>-1===fo.indexOf(t.pos)&&t.box.axis===e))}function mo(t,e){return t.sort(((t,n)=>{const i=e?n:t,s=e?t:n;return i.weight===s.weight?i.index-s.index:i.weight-s.weight}))}function bo(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:s}=n;if(!t||!fo.includes(i))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,l=n[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*i:r&&e.availableWidth,a.height=s):(a.width=i,a.height=c?c*s:r&&e.availableHeight)}return n}function xo(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function yo(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function _o(t,e,n,i){const{pos:s,box:o}=n,r=t.maxPadding;if(!Yt(s)){n.size&&(t[s]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?o.height:o.width),n.size=e.size/e.count,t[s]+=n.size}o.getPadding&&yo(r,o.getPadding());const a=Math.max(0,e.outerWidth-xo(r,t,"left","right")),l=Math.max(0,e.outerHeight-xo(r,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:h}:{same:h,other:c}}function vo(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function $o(t,e,n,i){const s=[];let o,r,a,l,c,h;for(o=0,r=t.length,c=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,vo(a.horizontal,e));const{same:r,other:u}=_o(e,n,a,i);c|=r&&s.length,h=h||u,l.fullSize||s.push(a)}return c&&$o(s,e,n,i)||h}function ko(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function wo(t,e,n,i){const s=n.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,l=i[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const i=e.w*c,o=l.size||t.height;he(l.start)&&(r=l.start),t.fullSize?ko(t,s.left,r,n.outerWidth-s.right-s.left,o):ko(t,e.left+l.placed,r,i,o),l.start=r,l.placed+=i,r=t.bottom}else{const i=e.h*c,r=l.size||t.width;he(l.start)&&(o=l.start),t.fullSize?ko(t,o,s.top,r,n.outerHeight-s.bottom-s.top):ko(t,o,e.top+l.placed,r,i),l.start=o,l.placed+=i,o=t.right}}e.x=o,e.y=r}Vn.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Co={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=ci(t.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(n-s.height,0),a=function(t){const e=function(t){const e=[];let n,i,s,o,r,a;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],({position:o,options:{stack:r,stackWeight:a=1}}=s),e.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}(t),n=mo(e.filter((t=>t.box.fullSize)),!0),i=mo(po(e,"left"),!0),s=mo(po(e,"right")),o=mo(po(e,"top"),!0),r=mo(po(e,"bottom")),a=go(e,"x"),l=go(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:po(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;Qt(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),d=Object.assign({},s);yo(d,ci(i));const f=Object.assign({maxPadding:d,w:o,h:r,x:s.left,y:s.top},s),p=bo(l.concat(c),u);$o(a.fullSize,f,u,p),$o(l,f,u,p),$o(c,f,u,p)&&$o(l,f,u,p),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),wo(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,wo(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Qt(a.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Mo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class So extends Mo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Lo="$chartjs",Do={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Po=t=>null===t||""===t;const Oo=!!Ui&&{passive:!0};function Ao(t,e,n){t.canvas.removeEventListener(e,n,Oo)}function Eo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function To(t,e,n){const i=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Eo(n.addedNodes,i),e=e&&!Eo(n.removedNodes,i);e&&n()}));return s.observe(document,{childList:!0,subtree:!0}),s}function Ro(t,e,n){const i=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Eo(n.removedNodes,i),e=e&&!Eo(n.addedNodes,i);e&&n()}));return s.observe(document,{childList:!0,subtree:!0}),s}const zo=new Map;let Io=0;function Fo(){const t=window.devicePixelRatio;t!==Io&&(Io=t,zo.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function No(t,e,n){const i=t.canvas,s=i&&Ri(i);if(!s)return;const o=We(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||o(n,i)}));return r.observe(s),function(t,e){zo.size||window.addEventListener("resize",Fo),zo.set(t,e)}(t,o),r}function jo(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){zo.delete(t),zo.size||window.removeEventListener("resize",Fo)}(t)}function Bo(t,e,n){const i=t.canvas,s=We((e=>{null!==t.ctx&&n(function(t,e){const n=Do[t.type]||t.type,{x:i,y:s}=Bi(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==s?s:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,n){t.addEventListener(e,n,Oo)}(i,e,s),s}class Vo extends Mo{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[Lo]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Po(s)){const e=qi(t,"width");void 0!==e&&(t.width=e)}if(Po(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=qi(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Lo])return!1;const n=e[Lo].initial;["height","width"].forEach((t=>{const i=n[t];Ut(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=n.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[Lo],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:To,detach:Ro,resize:No}[e]||Bo;i[e]=s(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;({attach:jo,detach:jo,resize:jo}[e]||Ao)(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return Hi(t,e,n,i)}isAttached(t){const e=Ri(t);return!(!e||!e.isConnected)}}class Ho{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,e,n);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,n,i){i=i||{};for(const s of t){const t=s.plugin;if(!1===Jt(t[n],[e,i,s.options],t)&&i.cancelable)return!1}return!0}invalidate(){Ut(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=Gt(n.options&&n.options.plugins,{}),s=function(t){const e={},n=[],i=Object.keys(to.plugins.items);for(let t=0;t<i.length;t++)n.push(to.getPlugin(i[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,s){const o=[],r=t.getContext();for(const a of e){const e=a.id,l=Wo(i[e],s);null!==l&&o.push({plugin:a,options:Uo(t.config,{plugin:a,local:n[e]},l,r)})}return o}(t,s,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function Wo(t,e){return e||!1!==t?!0===t?{}:t:null}function Uo(t,{plugin:e,local:n},i,s){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(i,o);return n&&e.defaults&&r.push(e.defaults),t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qo(t,e){const n=Vn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Yo(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.charAt(0).toLowerCase();var n}function Zo(t){const e=t.options||(t.options={});e.plugins=Gt(e.plugins,{}),e.scales=function(t,e){const n=Fn[t.type]||{scales:{}},i=e.scales||{},s=qo(t.type,e),o=Object.create(null),r=Object.create(null);return Object.keys(i).forEach((t=>{const e=i[t];if(!Yt(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=Yo(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=n.scales||{};o[a]=o[a]||t,r[t]=oe(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((n=>{const s=n.type||t.type,a=n.indexAxis||qo(s,e),l=(Fn[s]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),s=n[e+"AxisID"]||o[e]||e;r[s]=r[s]||Object.create(null),oe(r[s],[{axis:e},i[s],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];oe(e,[Vn.scales[e.type],Vn.scale])})),r}(t,e)}function Xo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Go=new Map,Ko=new Set;function Jo(t,e){let n=Go.get(t);return n||(n=e(),Go.set(t,n),Ko.add(n)),n}const Qo=(t,e,n)=>{const i=le(e,n);void 0!==i&&t.add(i)};class tr{constructor(t){this._config=function(t){return(t=t||{}).data=Xo(t.data),Zo(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Zo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jo(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Jo(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Jo(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Jo(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:s}=this,o=this._cachedScopes(t,n),r=o.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>Qo(a,t,e)))),e.forEach((t=>Qo(a,i,t))),e.forEach((t=>Qo(a,Fn[s]||{},t))),e.forEach((t=>Qo(a,Vn,t))),e.forEach((t=>Qo(a,Nn,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Ko.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Fn[e]||{},Vn.datasets[e]||{},{type:e},Vn,Nn]}resolveNamedOptions(t,e,n,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=er(this._resolverCache,t,i);let a=o;if(function(t,e){const{isScriptable:n,isIndexable:i}=gi(t);for(const s of e){const e=n(s),o=i(s),r=(o||e)&&t[s];if(e&&(ue(r)||nr(r))||o&&qt(r))return!0}return!1}(o,e)){s.$shared=!1;a=pi(o,n=ue(n)?n():n,this.createResolver(t,n,r))}for(const t of e)s[t]=a[t];return s}createResolver(t,e,n=[""],i){const{resolver:s}=er(this._resolverCache,t,n);return Yt(e)?pi(s,e,void 0,i):s}}function er(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let o=i.get(s);if(!o){o={resolver:fi(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},i.set(s,o)}return o}const nr=t=>Yt(t)&&Object.getOwnPropertyNames(t).reduce(((e,n)=>e||ue(t[n])),!1);const ir=["top","bottom","left","right","chartArea"];function sr(t,e){return"top"===t||"bottom"===t||-1===ir.indexOf(t)&&"x"===e}function or(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function rr(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Jt(n&&n.onComplete,[t],e)}function ar(t){const e=t.chart,n=e.options.animation;Jt(n&&n.onProgress,[t],e)}function lr(t){return Ti()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const cr={},hr=t=>{const e=lr(t);return Object.values(cr).filter((t=>t.canvas===e)).pop()};function ur(t,e,n){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=e){const o=t[s];delete t[s],(n>0||i>e)&&(t[i+n]=o)}}}class dr{constructor(t,e){const n=this.config=new tr(e),i=lr(t),s=hr(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!Ti()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?So:Vo}(i)),this.platform.updateConfig(n);const r=this.platform.acquireContext(i,o.aspectRatio),a=r&&r.canvas,l=a&&a.height,c=a&&a.width;this.id=Wt(),this.ctx=r,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ho,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],cr[this.id]=this,r&&a?(as.listen(this,"complete",rr),as.listen(this,"progress",ar),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:s}=this;return Ut(t)?e&&s?s:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Wi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qn(this.canvas,this.ctx),this}stop(){return as.stop(this),this}resize(t,e){as.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,e,s),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Wi(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Jt(n.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){Qt(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const n=e[t],i=Yo(t,n),s="r"===i,o="x"===i;return{options:n,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))),Qt(s,(e=>{const s=e.options,o=s.id,r=Yo(o,s),a=Gt(s.type,e.dtype);void 0!==s.position&&sr(s.position,r)===sr(e.dposition)||(s.position=e.dposition),i[o]=!0;let l=null;if(o in n&&n[o].type===a)l=n[o];else{l=new(to.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(s,t)})),Qt(i,((t,e)=>{t||delete n[e]})),Qt(n,(t=>{Co.configure(this,t,t.options),Co.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(or("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let s=this.getDatasetMeta(n);const o=i.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=o,s.indexAxis=i.indexAxis||qo(o,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const e=to.getController(o),{datasetElementType:i,dataElementType:r}=Vn.datasets[o];Object.assign(e.prototype,{dataElementType:to.getElement(r),datasetElementType:i&&to.getElement(i)}),s.controller=new e(this,n),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Qt(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!i&&-1===s.indexOf(e);e.buildOrUpdateElements(n),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),i||Qt(s,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(or("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Qt(this.scales,(t=>{Co.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);de(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:s}of e){ur(t,i,"_removeElements"===n?-s:s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=n(0);for(let t=1;t<e;t++)if(!de(i,n(t)))return;return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Co.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],Qt(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,ue(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(as.has(this)?this.attached&&!as.running(this)&&as.start(this):(this.draw(),rr({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,s;for(i=0,s=e.length;i<s;++i){const s=e[i];t&&!s.visible||n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,i=!n.disabled,s=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(i&&Xn(e,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?this.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?this.height:s.bottom+n.bottom}),t.controller.draw(),i&&Gn(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Zn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const s=uo.modes[e];return"function"==typeof s?s(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=di(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);he(e)?(s.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(s,{visible:n}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),as.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),qn(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete cr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};Qt(this.options.events,(t=>n(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const r=()=>{i("attach",r),this.attached=!0,this.resize(),n("resize",s),n("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),n("attach",r)},e.isAttached(this.canvas)?r():o()}unbindEvents(){Qt(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},Qt(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let s,o,r,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map((({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}));!te(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}_updateHoverStyles(t,e,n){const i=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=s(e,t),r=n?t:s(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const s=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(s||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:s}=this,o=e,r=this._getActiveElements(t,i,n,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,a);n&&(this._lastEvent=null,Jt(s.onHover,[t,r,this],this),a&&Jt(s.onClick,[t,r,this],this));const c=!te(r,i);return(c||e)&&(this._active=r,this._updateHoverStyles(r,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}const fr=()=>Qt(dr.instances,(t=>t._plugins.invalidate())),pr=!0;function gr(t,e,n){const{startAngle:i,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(o,r,a,i-c,n+c),l>s?(c=s/l,t.arc(o,r,l,n+c,i-c,!0)):t.arc(o,r,s,n+xe,i-xe),t.closePath(),t.clip()}function mr(t,e,n,i){const s=ri(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(n-e)/2,r=Math.min(o,i*e/2),a=t=>{const e=(n-Math.min(o,t))*i/2;return Re(t,0,Math.min(o,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Re(s.innerStart,0,r),innerEnd:Re(s.innerEnd,0,r)}}function br(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function xr(t,e,n,i,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,u=Math.max(e.outerRadius+i+n-c,0),d=h>0?h+i+n+c:0;let f=0;const p=s-l;if(i){const t=((h>0?h-i:0)+(u>0?u-i:0))/2;f=(p-(0!==t?p*t/(t+i):p))/2}const g=(p-Math.max(.001,p*u-n/fe)/u)/2,m=l+g+f,b=s-g-f,{outerStart:x,outerEnd:y,innerStart:_,innerEnd:v}=mr(e,d,u,b-m),$=u-x,k=u-y,w=m+x/$,C=b-y/k,M=d+_,S=d+v,L=m+_/M,D=b-v/S;if(t.beginPath(),o){if(t.arc(r,a,u,w,C),y>0){const e=br(k,C,r,a);t.arc(e.x,e.y,y,C,b+xe)}const e=br(S,b,r,a);if(t.lineTo(e.x,e.y),v>0){const e=br(S,D,r,a);t.arc(e.x,e.y,v,b+xe,D+Math.PI)}if(t.arc(r,a,d,b-v/d,m+_/d,!0),_>0){const e=br(M,L,r,a);t.arc(e.x,e.y,_,L+Math.PI,m-xe)}const n=br($,m,r,a);if(t.lineTo(n.x,n.y),x>0){const e=br($,w,r,a);t.arc(e.x,e.y,x,m-xe,w)}}else{t.moveTo(r,a);const e=Math.cos(w)*u+r,n=Math.sin(w)*u+a;t.lineTo(e,n);const i=Math.cos(C)*u+r,s=Math.sin(C)*u+a;t.lineTo(i,s)}t.closePath()}function yr(t,e,n,i,s,o){const{options:r}=e,{borderWidth:a,borderJoinStyle:l}=r,c="inner"===r.borderAlign;a&&(c?(t.lineWidth=2*a,t.lineJoin=l||"round"):(t.lineWidth=a,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,n){const{x:i,y:s,startAngle:o,pixelMargin:r,fullCircles:a}=e,l=Math.max(e.outerRadius-r,0),c=e.innerRadius+r;let h;for(n&&gr(t,e,o+pe),t.beginPath(),t.arc(i,s,c,o+pe,o,!0),h=0;h<a;++h)t.stroke();for(t.beginPath(),t.arc(i,s,l,o,o+pe),h=0;h<a;++h)t.stroke()}(t,e,c),c&&gr(t,e,s),xr(t,e,n,i,s,o),t.stroke())}Object.defineProperties(dr,{defaults:{enumerable:pr,value:Vn},instances:{enumerable:pr,value:cr},overrides:{enumerable:pr,value:Fn},registry:{enumerable:pr,value:to},version:{enumerable:pr,value:"3.9.1"},getChart:{enumerable:pr,value:hr},register:{enumerable:pr,value:(...t)=>{to.add(...t),fr()}},unregister:{enumerable:pr,value:(...t)=>{to.remove(...t),fr()}}});class _r extends js{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:s,distance:o}=Pe(i,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=this.options.spacing/2,d=Gt(h,a-r)>=pe||Te(s,r,a),f=ze(o,l+u,c+u);return d&&f}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(i+s)/2,h=(o+r+l+a)/2;return{x:e+Math.cos(c)*h,y:n+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/2,s=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>pe?Math.floor(n/pe):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(i){r=i/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*r,Math.sin(e)*r),this.circumference>=fe&&(r=i)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,n,i,s){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){xr(t,e,n,i,r+pe,s);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=r+a%pe,a%pe==0&&(l+=pe))}return xr(t,e,n,i,l,s),t.fill(),l}(t,this,r,s,o);yr(t,this,r,s,a,o),t.restore()}}function vr(t,e,n=e){t.lineCap=Gt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Gt(n.borderDash,e.borderDash)),t.lineDashOffset=Gt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Gt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Gt(n.borderWidth,e.borderWidth),t.strokeStyle=Gt(n.borderColor,e.borderColor)}function $r(t,e,n){t.lineTo(n.x,n.y)}function kr(t,e,n={}){const i=t.length,{start:s=0,end:o=i-1}=n,{start:r,end:a}=e,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:i,start:l,loop:e.loop,ilen:c<l&&!h?i+c-l:c-l}}function wr(t,e,n,i){const{points:s,options:o}=e,{count:r,start:a,loop:l,ilen:c}=kr(s,n,i),h=function(t){return t.stepped?Kn:t.tension||"monotone"===t.cubicInterpolationMode?Jn:$r}(o);let u,d,f,{move:p=!0,reverse:g}=i||{};for(u=0;u<=c;++u)d=s[(a+(g?c-u:u))%r],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):h(t,f,d,g,o.stepped),f=d);return l&&(d=s[(a+(g?c:0))%r],h(t,f,d,g,o.stepped)),!!l}function Cr(t,e,n,i){const s=e.points,{count:o,start:r,ilen:a}=kr(s,n,i),{move:l=!0,reverse:c}=i||{};let h,u,d,f,p,g,m=0,b=0;const x=t=>(r+(c?a-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=s[x(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=s[x(h)],u.skip)continue;const e=u.x,n=u.y,i=0|e;i===d?(n<f?f=n:n>p&&(p=n),m=(b*m+e)/++b):(y(),t.lineTo(e,n),d=i,b=0,f=p=n),g=n}y()}function Mr(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n)?Cr:wr}_r.id="arc",_r.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},_r.defaultRoutes={backgroundColor:"backgroundColor"};const Sr="function"==typeof Path2D;function Lr(t,e,n,i){Sr&&!e.options.segment?function(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),vr(t,e.options),t.stroke(s)}(t,e,n,i):function(t,e,n,i){const{segments:s,options:o}=e,r=Mr(e);for(const a of s)vr(t,o,a.style),t.beginPath(),r(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}class Dr extends js{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Ei(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const o=!!t._loop,{start:r,end:a}=function(t,e,n,i){let s=0,o=e-1;if(n&&!i)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,n&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(n,s,o,i);return ss(t,!0===i?[{start:r,end:a,loop:o}]:function(t,e,n,i){const s=t.length,o=[];let r,a=e,l=t[e];for(r=e+1;r<=n;++r){const n=t[r%s];n.skip||n.stop?l.skip||(i=!1,o.push({start:e%s,end:(r-1)%s,loop:i}),e=a=n.stop?r:null):(a=r,l.skip&&(e=r)),l=n}return null!==a&&o.push({start:e%s,end:a%s,loop:i}),o}(n,r,a<r?a+s:a,!!t._fullLoop&&0===r&&a===s-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],s=this.points,o=function(t,e){const n=[],i=t.segments;for(let s=0;s<i.length;s++){const o=is(i[s],t.points,e);o.length&&n.push(...o)}return n}(this,{property:e,start:i,end:i});if(!o.length)return;const r=[],a=function(t){return t.stepped?Zi:t.tension||"monotone"===t.cubicInterpolationMode?Xi:Yi}(n);let l,c;for(l=0,c=o.length;l<c;++l){const{start:c,end:h}=o[l],u=s[c],d=s[h];if(u===d){r.push(u);continue}const f=a(u,d,Math.abs((i-u[e])/(d[e]-u[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,n){return Mr(this)(t,this,e,n)}path(t,e,n){const i=this.segments,s=Mr(this);let o=this._loop;e=e||0,n=n||this.points.length-e;for(const r of i)o&=s(t,this,r,{start:e,end:e+n-1});return!!o}draw(t,e,n,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),Lr(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Pr(t,e,n,i){const s=t.options,{[n]:o}=t.getProps([n],i);return Math.abs(e-o)<s.radius+s.hitRadius}Dr.id="line",Dr.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Dr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Dr.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Or extends js{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:s,y:o}=this.getProps(["x","y"],n);return Math.pow(t-s,2)+Math.pow(e-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return Pr(this,t,"x",e)}inYRange(t,e){return Pr(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!Zn(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Yn(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ar(t,e){const{x:n,y:i,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,u;return t.horizontal?(u=r/2,a=Math.min(n,s),l=Math.max(n,s),c=i-u,h=i+u):(u=o/2,a=n-u,l=n+u,c=Math.min(i,s),h=Math.max(i,s)),{left:a,top:c,right:l,bottom:h}}function Er(t,e,n,i){return t?0:Re(e,n,i)}function Tr(t){const e=Ar(t),n=e.right-e.left,i=e.bottom-e.top,s=function(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,o=ai(i);return{t:Er(s.top,o.top,0,n),r:Er(s.right,o.right,0,e),b:Er(s.bottom,o.bottom,0,n),l:Er(s.left,o.left,0,e)}}(t,n/2,i/2),o=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=li(s),r=Math.min(e,n),a=t.borderSkipped,l=i||Yt(s);return{topLeft:Er(!l||a.top||a.left,o.topLeft,0,r),topRight:Er(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Er(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Er(!l||a.bottom||a.right,o.bottomRight,0,r)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Rr(t,e,n,i){const s=null===e,o=null===n,r=t&&!(s&&o)&&Ar(t,i);return r&&(s||ze(e,r.left,r.right))&&(o||ze(n,r.top,r.bottom))}function zr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ir(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-i,r=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}Or.id="point",Or.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Or.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Fr extends js{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:s,outer:o}=Tr(this),r=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?ei:zr;var a;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),r(t,Ir(o,e,s)),t.clip(),r(t,Ir(s,-e,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,Ir(s,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return Rr(this,t,e,n)}inXRange(t,e){return Rr(this,t,null,e)}inYRange(t,e){return Rr(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+i)/2:e,y:s?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Fr.id="bar",Fr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Fr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Nr={average(t){if(!t.length)return!1;let e,n,i=0,s=0,o=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i+=t.x,s+=t.y,++o}}return{x:i/o,y:s/o}},nearest(t,e){if(!t.length)return!1;let n,i,s,o=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=Oe(e,i.getCenterPoint());t<a&&(a=t,s=i)}}if(s){const t=s.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function jr(t,e){return e&&(qt(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Br(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Vr(t,e){const{element:n,datasetIndex:i,index:s}=e,o=t.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Hr(t,e){const n=t.chart.ctx,{body:i,footer:s,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=hi(e.bodyFont),c=hi(e.titleFont),h=hi(e.footerFont),u=o.length,d=s.length,f=i.length,p=ci(e.padding);let g=p.height,m=0,b=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,n.measureText(t).width+x)};return n.save(),n.font=c.string,Qt(t.title,y),n.font=l.string,Qt(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?r+2+e.boxPadding:0,Qt(i,(t=>{Qt(t.before,y),Qt(t.lines,y),Qt(t.after,y)})),x=0,n.font=h.string,Qt(t.footer,y),n.restore(),m+=p.width,{width:m,height:g}}function Wr(t,e,n,i){const{x:s,width:o}=n,{width:r,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),function(t,e,n,i){const{x:s,width:o}=i,r=n.caretSize+n.caretPadding;return"left"===t&&s+o+r>e.width||"right"===t&&s-o-r<0||void 0}(c,t,e,n)&&(c="center"),c}function Ur(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Wr(t,e,n,i),yAlign:i}}function qr(t,e,n,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=li(r);let p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,a);const g=function(t,e,n){let{y:i,height:s}=t;return"top"===e?i+=n:i-="bottom"===e?s+n:s/2,i}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+s:"right"===a&&(p+=Math.max(u,f)+s),{x:Re(p,0,i.width-e.width),y:Re(g,0,i.height-e.height)}}function Yr(t,e,n){const i=ci(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Zr(t){return jr([],Br(t))}function Xr(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}(class extends js{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,s=new ds(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,di(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,i=n.beforeTitle.apply(this,[t]),s=n.title.apply(this,[t]),o=n.afterTitle.apply(this,[t]);let r=[];return r=jr(r,Br(i)),r=jr(r,Br(s)),r=jr(r,Br(o)),r}getBeforeBody(t,e){return Zr(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:n}=e,i=[];return Qt(t,(t=>{const e={before:[],lines:[],after:[]},s=Xr(n,t);jr(e.before,Br(s.beforeLabel.call(this,t))),jr(e.lines,s.label.call(this,t)),jr(e.after,Br(s.afterLabel.call(this,t))),i.push(e)})),i}getAfterBody(t,e){return Zr(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:n}=e,i=n.beforeFooter.apply(this,[t]),s=n.footer.apply(this,[t]),o=n.afterFooter.apply(this,[t]);let r=[];return r=jr(r,Br(i)),r=jr(r,Br(s)),r=jr(r,Br(o)),r}_createItems(t){const e=this._active,n=this.chart.data,i=[],s=[],o=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(Vr(this.chart,e[r]));return t.filter&&(l=l.filter(((e,i,s)=>t.filter(e,i,s,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),Qt(l,(e=>{const n=Xr(t.callbacks,e);i.push(n.labelColor.call(this,e)),s.push(n.labelPointStyle.call(this,e)),o.push(n.labelTextColor.call(this,e))})),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(i.length){const t=Nr[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=Hr(this,n),r=Object.assign({},t,e),a=Ur(this.chart,n,r),l=qr(n,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const s=this.getCaretPosition(t,n,i);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:r}=n,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=li(r),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,x,y,_;return"center"===s?(y=d+p/2,"left"===i?(g=u,m=g-o,x=y+o,_=y-o):(g=u+f,m=g+o,x=y-o,_=y+o),b=g):(m="left"===i?u+Math.max(a,c)+o:"right"===i?u+f-Math.max(l,h)-o:this.caretX,"top"===s?(x=d,y=x-o,g=m-o,b=m+o):(x=d+p,y=x+o,g=m+o,b=m-o),_=x),{x1:g,x2:m,x3:b,y1:x,y2:y,y3:_}}drawTitle(t,e,n){const i=this.title,s=i.length;let o,r,a;if(s){const l=ts(n.rtl,this.x,this.width);for(t.x=Yr(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",o=hi(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=o.string,a=0;a<s;++a)e.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,a+1===s&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,e,n,i,s){const o=this.labelColors[n],r=this.labelPointStyles[n],{boxHeight:a,boxWidth:l,boxPadding:c}=s,h=hi(s.bodyFont),u=Yr(this,"left",s),d=i.x(u),f=a<h.lineHeight?(h.lineHeight-a)/2:0,p=e.y+f;if(s.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},n=i.leftForLtr(d,l)+l/2,c=p+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Yn(t,e,n,c),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Yn(t,e,n,c)}else{t.lineWidth=Yt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=i.leftForLtr(d,l-c),n=i.leftForLtr(i.xPlus(d,1),l-c-2),r=li(o.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=s.multiKeyBackground,ei(t,{x:e,y:p,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ei(t,{x:n,y:p+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(n,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:c}=n,h=hi(n.bodyFont);let u=h.lineHeight,d=0;const f=ts(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+d),t.y+u/2),t.y+=u+s},g=f.textAlign(o);let m,b,x,y,_,v,$;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Yr(this,g,n),e.fillStyle=n.bodyColor,Qt(this.beforeBody,p),d=r&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,v=i.length;y<v;++y){for(m=i[y],b=this.labelTextColors[y],e.fillStyle=b,Qt(m.before,p),x=m.lines,r&&x.length&&(this._drawColorBox(e,t,y,f,n),u=Math.max(h.lineHeight,a)),_=0,$=x.length;_<$;++_)p(x[_]),u=h.lineHeight;Qt(m.after,p)}d=0,u=h.lineHeight,Qt(this.afterBody,p),t.y-=s}drawFooter(t,e,n){const i=this.footer,s=i.length;let o,r;if(s){const a=ts(n.rtl,this.x,this.width);for(t.x=Yr(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=a.textAlign(n.footerAlign),e.textBaseline="middle",o=hi(n.footerFont),e.fillStyle=n.footerColor,e.font=o.string,r=0;r<s;++r)e.fillText(i[r],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:s,yAlign:o}=this,{x:r,y:a}=t,{width:l,height:c}=n,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=li(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(r+h,a),"top"===o&&this.drawCaret(t,e,n,i),e.lineTo(r+l-u,a),e.quadraticCurveTo(r+l,a,r+l,a+u),"center"===o&&"right"===s&&this.drawCaret(t,e,n,i),e.lineTo(r+l,a+c-f),e.quadraticCurveTo(r+l,a+c,r+l-f,a+c),"bottom"===o&&this.drawCaret(t,e,n,i),e.lineTo(r+d,a+c),e.quadraticCurveTo(r,a+c,r,a+c-d),"center"===o&&"left"===s&&this.drawCaret(t,e,n,i),e.lineTo(r,a+h),e.quadraticCurveTo(r,a,r+h,a),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,s=n&&n.y;if(i||s){const n=Nr[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=Hr(this,t),r=Object.assign({},n,this._size),a=Ur(e,t,r),l=qr(t,r,a,e);i._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=ci(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(s,t,i,e),function(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),function(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!te(n,i),o=this._positionChanged(i,e);(s||o)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,n),r=this._positionChanged(o,t),a=e||!te(o,s)||r;return a&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,n,i){const s=this.options;if("mouseout"===t.type)return[];if(!i)return e;const o=this.chart.getElementsAtEventForMode(t,s.mode,s,n);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:i,options:s}=this,o=Nr[s.position].call(this,t,e);return!1!==o&&(n!==o.x||i!==o.y)}}).positioners=Nr;const Gr=(t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);class Kr extends Js{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Ut(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const s=t.indexOf(e);return-1===s?Gr(t,e,n,i):s!==t.lastIndexOf(e)?n:s}(n,t,Gt(e,t),this._addedLabels),((t,e)=>null===t?null:Re(Math.round(t),0,e))(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Jr(t,e){const n=[],{bounds:i,step:s,min:o,max:r,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=s||1,f=c-1,{min:p,max:g}=e,m=!Ut(o),b=!Ut(r),x=!Ut(l),y=(g-p)/(h+1);let _,v,$,k,w=ke((g-p)/f/d)*d;if(w<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/w)-Math.floor(p/w),k>f&&(w=ke(k*w/f/d)*d),Ut(a)||(_=Math.pow(10,a),w=Math.ceil(w*_)/_),"ticks"===i?(v=Math.floor(p/w)*w,$=Math.ceil(g/w)*w):(v=p,$=g),m&&b&&s&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((r-o)/s,w/1e3)?(k=Math.round(Math.min((r-o)/w,c)),w=(r-o)/k,v=o,$=r):x?(v=m?o:v,$=b?r:$,k=l-1,w=($-v)/k):(k=($-v)/w,k=Ce(k,Math.round(k),w/1e3)?Math.round(k):Math.ceil(k));const C=Math.max(De(w),De(v));_=Math.pow(10,Ut(a)?C:a),v=Math.round(v*_)/_,$=Math.round($*_)/_;let M=0;for(m&&(u&&v!==o?(n.push({value:o}),v<o&&M++,Ce(Math.round((v+M*w)*_)/_,o,Qr(o,y,t))&&M++):v<o&&M++);M<k;++M)n.push({value:Math.round((v+M*w)*_)/_});return b&&u&&$!==r?n.length&&Ce(n[n.length-1].value,r,Qr(r,y,t))?n[n.length-1].value=r:n.push({value:r}):b&&$!==r||n.push({value:$}),n}function Qr(t,e,{horizontal:n,minRotation:i}){const s=Se(i),o=(n?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}Kr.id="category",Kr.defaults={ticks:{callback:Kr.prototype.getLabelForValue}};class ta extends Js{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Ut(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this;const o=t=>i=e?i:t,r=t=>s=n?s:t;if(t){const t=$e(i),e=$e(s);t<0&&e<0?r(0):t>0&&e>0&&o(0)}if(i===s){let e=1;(s>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*s)),r(s+e),t||o(i-e)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=Jr({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Me(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Ki(t,this.chart.options.locale,this.options.ticks.format)}}class ea extends ta{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Zt(t)?t:0,this.max=Zt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Se(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function na(t){return 1===t/Math.pow(10,Math.floor(ve(t)))}ea.id="linear",ea.defaults={ticks:{callback:Vs.formatters.numeric}};class ia extends Js{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=ta.prototype.parse.apply(this,[t,e]);if(0!==n)return Zt(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Zt(t)?Math.max(0,t):null,this.max=Zt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const s=e=>n=t?n:e,o=t=>i=e?i:t,r=(t,e)=>Math.pow(10,Math.floor(ve(t))+e);n===i&&(n<=0?(s(1),o(10)):(s(r(n,-1)),o(r(i,1)))),n<=0&&s(r(i,-1)),i<=0&&o(r(n,1)),this._zero&&this.min!==this._suggestedMin&&n===r(this.min,0)&&s(r(n,-1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,e){const n=Math.floor(ve(e.max)),i=Math.ceil(e.max/Math.pow(10,n)),s=[];let o=Xt(t.min,Math.pow(10,Math.floor(ve(e.min)))),r=Math.floor(ve(o)),a=Math.floor(o/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{s.push({value:o,major:na(o)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),o=Math.round(a*Math.pow(10,r)*l)/l}while(r<n||r===n&&a<i);const c=Xt(t.max,o);return s.push({value:c,major:na(o)}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Me(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Ki(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ve(t),this._valueRange=ve(this.max)-ve(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ve(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function sa(t){const e=t.ticks;if(e.display&&t.display){const t=ci(e.backdropPadding);return Gt(e.font&&e.font.size,Vn.font.size)+t.height}return 0}function oa(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function ra(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?fe/o:0;for(let u=0;u<o;u++){const o=r.setContext(t.getPointLabelContext(u));s[u]=o.padding;const d=t.getPointPosition(u,t.drawingArea+s[u],a),f=hi(o.font),p=(l=t.ctx,c=f,h=qt(h=t._pointLabels[u])?h:[h],{w:Wn(l,c.string,h),h:h.length*c.lineHeight});i[u]=p;const g=Ee(t.getIndexAngle(u)+a),m=Math.round(Le(g));aa(n,e,g,oa(m,d.x,p.w,0,180),oa(m,d.y,p.h,90,270))}var l,c,h;t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],s=t._pointLabels.length,o=t.options,r=sa(o)/2,a=t.drawingArea,l=o.pointLabels.centerPointLabels?fe/s:0;for(let o=0;o<s;o++){const s=t.getPointPosition(o,a+r+n[o],l),c=Math.round(Le(Ee(s.angle+xe))),h=e[o],u=ha(s.y,h.h,c),d=la(c),f=ca(s.x,h.w,d);i.push({x:s.x,y:u,textAlign:d,left:f,top:u,right:f+h.w,bottom:u+h.h})}return i}(t,i,s)}function aa(t,e,n,i,s){const o=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,l=0;i.start<e.l?(a=(e.l-i.start)/o,t.l=Math.min(t.l,e.l-a)):i.end>e.r&&(a=(i.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function la(t){return 0===t||180===t?"center":t<180?"left":"right"}function ca(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ha(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}function ua(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,pe);else{let n=t.getPointPosition(0,e);s.moveTo(n.x,n.y);for(let o=1;o<i;o++)n=t.getPointPosition(o,e),s.lineTo(n.x,n.y)}}ia.id="logarithmic",ia.defaults={ticks:{callback:Vs.formatters.logarithmic,major:{enabled:!0}}};class da extends ta{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ci(sa(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Zt(t)&&!isNaN(t)?t:0,this.max=Zt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/sa(this.options))}generateTickLabels(t){ta.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const n=Jt(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?ra(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return Ee(t*(pe/(this._pointLabels.length||1))+Se(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Ut(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Ut(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return di(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-xe+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:s}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),ua(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i}=e,s=this._pointLabels.length;let o,r,a;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const e=i.setContext(t.getPointLabelContext(s)),o=hi(e.font),{x:r,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[s],{backdropColor:f}=e;if(!Ut(f)){const t=li(e.borderRadius),i=ci(e.backdropPadding);n.fillStyle=f;const s=c-i.left,o=h-i.top,r=u-c+i.width,a=d-h+i.height;Object.values(t).some((t=>0!==t))?(n.beginPath(),ei(n,{x:s,y:o,w:r,h:a,radius:t}),n.fill()):n.fillRect(s,o,r,a)}Qn(n,t._pointLabels[s],r,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),i.display&&this.ticks.forEach(((t,e)=>{if(0!==e){r=this.getDistanceFromCenterForValue(t.value);!function(t,e,n,i){const s=t.ctx,o=e.circular,{color:r,lineWidth:a}=e;!o&&!i||!r||!a||n<0||(s.save(),s.strokeStyle=r,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),ua(t,n,o,i),s.closePath(),s.stroke(),s.restore())}(this,i.setContext(this.getContext(e-1)),r,s)}})),n.display){for(t.save(),o=s-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:s,lineWidth:l}=i;l&&s&&(t.lineWidth=l,t.strokeStyle=s,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((i,r)=>{if(0===r&&!e.reverse)return;const a=n.setContext(this.getContext(r)),l=hi(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(i.label).width,t.fillStyle=a.backdropColor;const e=ci(a.backdropPadding);t.fillRect(-o/2-e.left,-s-l.size/2-e.top,o+e.width,l.size+e.height)}Qn(t,i.label,0,-s,l,{color:a.color})})),t.restore()}drawTitle(){}}da.id="radialLinear",da.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},da.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},da.descriptors={angleLines:{_fallback:"grid"}};const fa={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},pa=Object.keys(fa);function ga(t,e){return t-e}function ma(t,e){if(Ut(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof i&&(r=i(r)),Zt(r)||(r="string"==typeof i?n.parse(r,i):n.parse(r)),null===r?null:(s&&(r="week"!==s||!we(o)&&!0!==o?n.startOf(r,s):n.startOf(r,"isoWeek",o)),+r)}function ba(t,e,n,i){const s=pa.length;for(let o=pa.indexOf(t);o<s-1;++o){const t=fa[pa[o]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(s*t.size))<=i)return pa[o]}return pa[s-1]}function xa(t,e,n){if(n){if(n.length){const{lo:i,hi:s}=Ie(n,e);t[n[i]>=e?n[i]:n[s]]=!0}}else t[e]=!0}function ya(t,e,n){const i=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,i.push({value:a,major:!1});return 0!==o&&n?function(t,e,n,i){const s=t._adapter,o=+s.startOf(e[0].value,i),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}(t,i,s,n):i}class _a extends Js{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const n=t.time||(t.time={}),i=this._adapter=new so._date(t.adapters.date);i.init(e),oe(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:ma(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){o||isNaN(t.min)||(i=Math.min(i,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}o&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),i=Zt(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),s=Zt(s)&&!isNaN(s)?s:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=function(t,e,n){let i=0,s=t.length;for(;i<s&&t[i]<e;)i++;for(;s>i&&t[s-1]>n;)s--;return i>0||s<t.length?t.slice(i,s):t}(i,s,this.max);return this._unit=e.unit||(n.autoSkip?ba(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,n,i,s){for(let o=pa.length-1;o>=pa.indexOf(n);o--){const n=pa[o];if(fa[n].common&&t._adapter.diff(s,i,n)>=e-1)return n}return pa[n?pa.indexOf(n):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=pa.indexOf(t)+1,n=pa.length;e<n;++e)if(fa[pa[e]].common)return pa[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&o.reverse(),ya(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,n,i=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;i=Re(i,0,o),s=Re(s,0,o),this._offsets={start:i,end:s,factor:1/(i+1+s)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,s=i.time,o=s.unit||ba(s.minUnit,e,n,this._getLabelCapacity(e)),r=Gt(s.stepSize,1),a="week"===o&&s.isoWeekday,l=we(a)||!0===a,c={};let h,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":o),t.diff(n,e,o)>1e5*r)throw new Error(e+" and "+n+" are too far apart with stepSize of "+r+" "+o);const f="data"===i.ticks.source&&this.getDataTimestamps();for(h=d,u=0;h<n;h=+t.add(h,r,o),u++)xa(c,h,f);return h!==n&&"ticks"!==i.bounds&&1!==u||xa(c,h,f),Object.keys(c).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}_tickFormatFunction(t,e,n,i){const s=this.options,o=s.time.displayFormats,r=this._unit,a=this._majorUnit,l=r&&o[r],c=a&&o[a],h=n[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,i||(u?c:l)),f=s.ticks.callback;return f?Jt(f,[d,e,n],this):d}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=Se(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(i),o=Math.sin(i),r=this._resolveTickFontOptions(0).size;return{w:n*s+r*o,h:n*o+r*s}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,s=this._tickFormatFunction(t,0,ya(this,[t],this._majorUnit),i),o=this._getLabelSize(s),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(ma(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ve(t.sort(ga))}}function va(t,e,n){let i,s,o,r,a=0,l=t.length-1;n?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Fe(t,"pos",e)),({pos:i,time:o}=t[a]),({pos:s,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Fe(t,"time",e)),({time:i,pos:o}=t[a]),({time:s,pos:r}=t[l]));const c=s-i;return c?o+(r-o)*(e-i)/c:o}_a.id="time",_a.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class $a extends _a{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=va(e,this.min),this._tableRange=va(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],s=[];let o,r,a,l,c;for(o=0,r=t.length;o<r;++o)l=t[o],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(o=0,r=i.length;o<r;++o)c=i[o+1],a=i[o-1],l=i[o],Math.round((c+a)/2)!==l&&s.push({time:l,pos:o/(r-1)});return s}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(va(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return va(this._table,n*this._tableRange+this._minPos,!0)}}$a.id="timeseries",$a.defaults=_a.defaults;const ka=["#faab4a","#2e3454","#2a679d","#f8d9d8"];function wa(e){let n,i;return{c(){n=$("div"),i=$("canvas"),L(n,"data-component","bar-chart")},m(t,s){y(t,n,s),x(n,i),e[2](i)},p:t,i:t,o:t,d(t){t&&_(n),e[2](null)}}}function Ca(t,e,n){dr.register(Fr,Es,ea,Kr,Or);let{componentData:i}=e;const{config:s,data:o,labels:r}=i;let a;const l=s||{type:"bar",data:{labels:r,datasets:[{backgroundColor:ka[2],borderColor:ka[2],data:o||[]}]},options:{plugins:{legend:{display:!1}}}};return t.$$set=t=>{"componentData"in t&&n(1,i=t.componentData)},t.$$.update=()=>{1&t.$$.dirty&&a&&new dr(a,l)},[a,i,function(t){H[t?"unshift":"push"]((()=>{a=t,n(0,a)}))}]}class Ma extends pt{constructor(t){super(),ft(this,t,Ca,wa,r,{componentData:1})}}function Sa(t){let e,n,i;return{c(){e=$("div"),n=C(),i=$("div"),L(e,"class","path topLeft svelte-1hyaq5f"),L(i,"class","path bottomRight svelte-1hyaq5f")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s)},d(t){t&&_(e),t&&_(n),t&&_(i)}}}function La(t){let e;return{c(){e=$("div"),L(e,"class","path straightLine svelte-1hyaq5f")},m(t,n){y(t,e,n)},d(t){t&&_(e)}}}function Da(e){let n;function i(t,e){return t[5]?La:Sa}let s=i(e),o=s(e);return{c(){n=$("div"),o.c(),L(n,"class","connectorwrapper svelte-1hyaq5f"),O(n,"top",e[1]+"rem"),O(n,"left",e[0]+"rem"),O(n,"width",e[3]+"rem"),O(n,"height",e[4]+"rem"),A(n,"flip",e[2])},m(t,e){y(t,n,e),o.m(n,null)},p(t,[e]){s!==(s=i(t))&&(o.d(1),o=s(t),o&&(o.c(),o.m(n,null))),2&e&&O(n,"top",t[1]+"rem"),1&e&&O(n,"left",t[0]+"rem"),8&e&&O(n,"width",t[3]+"rem"),16&e&&O(n,"height",t[4]+"rem"),4&e&&A(n,"flip",t[2])},i:t,o:t,d(t){t&&_(n),o.d()}}}const Pa=.5;function Oa(t,e,n){let i,s,o,{top:r=0}=e,{left:a=0}=e,{bottom:l=0}=e,{right:c=0}=e,h=!1;return t.$$set=t=>{"top"in t&&n(1,r=t.top),"left"in t&&n(0,a=t.left),"bottom"in t&&n(7,l=t.bottom),"right"in t&&n(6,c=t.right)},t.$$.update=()=>{207&t.$$.dirty&&(n(2,i=c-a<0),n(3,s=Math.abs(c-a)),s<=Pa?(n(3,s=Pa),n(5,h=!0),n(0,a-=Pa/2)):(i?(n(0,a+=Pa/2),n(6,c-=Pa/2)):(n(0,a-=Pa/2),n(6,c+=Pa/2)),n(3,s=Math.abs(c-a))),n(4,o=l-r))},[a,r,i,s,o,h,c,l]}class Aa extends pt{constructor(t){super(),ft(this,t,Oa,Da,r,{top:1,left:0,bottom:7,right:6})}}function Ea(t,e,n){const i=t.slice();return i[4]=e[n],i}function Ta(t){let e,n;return e=new Aa({props:{top:wt(t[4].top),left:wt(t[4].left),bottom:wt(t[4].bottom),right:wt(t[4].right)}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.top=wt(t[4].top)),1&n&&(i.left=wt(t[4].left)),1&n&&(i.bottom=wt(t[4].bottom)),1&n&&(i.right=wt(t[4].right)),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ra(t){let e,n,i=t[0],s=[];for(let e=0;e<i.length;e+=1)s[e]=Ta(Ea(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,[n]){if(1&n){let r;for(i=t[0],r=0;r<i.length;r+=1){const o=Ea(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Ta(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function za(t,e,n){let{steps:i}=e,{boxes:s}=e,{container:o}=e,r=[];return t.$$set=t=>{"steps"in t&&n(1,i=t.steps),"boxes"in t&&n(2,s=t.boxes),"container"in t&&n(3,o=t.container)},t.$$.update=()=>{if(15&t.$$.dirty){n(0,r=[]);const t=o.getBoundingClientRect(),e=t.top,a=t.left;s&&Object.keys(i).forEach((t=>{var o;const l=i[t],c=s[t].getBoundingClientRect();null===(o=l.next)||void 0===o||o.forEach((t=>{const i=s[t].getBoundingClientRect(),o={top:c.bottom-e,left:c.left-a+c.width/2,bottom:i.top-e,right:i.left-a+i.width/2};n(0,r=[...r,o])}))}))}},[r,i,s,o]}class Ia extends pt{constructor(t){super(),ft(this,t,za,Ra,r,{steps:1,boxes:2,container:3})}}const Fa="currentStep";function Na(t,e,n){const i=t.slice();return i[18]=e[n],i[20]=n,i}function ja(t){let e,n,i;return{c(){e=$("div"),n=w("x"),i=w(t[6]),L(e,"class","levelstoshow svelte-117ceti")},m(t,s){y(t,e,s),x(e,n),x(e,i)},p(t,e){64&e&&P(i,t[6])},d(t){t&&_(e)}}}function Ba(t){let e,n;return{c(){e=$("div"),L(e,"class",n="level rectangle "+t[18]+" svelte-117ceti"),O(e,"z-index",-1*(t[20]+1)),O(e,"top",(t[20]+1)*Ha+"px"),O(e,"left",(t[20]+1)*Ha+"px")},m(t,n){y(t,e,n)},p(t,i){128&i&&n!==(n="level rectangle "+t[18]+" svelte-117ceti")&&L(e,"class",n)},d(t){t&&_(e)}}}function Va(e){let n,i,s,o,r,a,l,c,h,u,d,f=e[2].doc+"",p=e[6]&&ja(e),g=e[7],m=[];for(let t=0;t<g.length;t+=1)m[t]=Ba(Na(e,g,t));return{c(){n=$("div"),p&&p.c(),i=C(),s=$("div"),o=$("div"),r=$("span"),a=w(e[1]),l=C(),c=$("div"),h=w(f),d=C();for(let t=0;t<m.length;t+=1)m[t].c();L(r,"class","name svelte-117ceti"),L(c,"class","description svelte-117ceti"),L(c,"title",u=e[9]?e[2].doc:void 0),A(c,"overflown",e[9]),L(o,"class","inner svelte-117ceti"),L(s,"class","step rectangle svelte-117ceti"),A(s,"success",e[3]),A(s,"running",e[5]),A(s,"error",e[4]),L(n,"class","wrapper svelte-117ceti"),A(n,"current",e[10])},m(t,u){y(t,n,u),p&&p.m(n,null),x(n,i),x(n,s),x(s,o),x(o,r),x(r,a),x(o,l),x(o,c),x(c,h),e[12](c),e[13](s),x(n,d);for(let t=0;t<m.length;t+=1)m[t]&&m[t].m(n,null)},p(t,[e]){if(t[6]?p?p.p(t,e):(p=ja(t),p.c(),p.m(n,i)):p&&(p.d(1),p=null),2&e&&P(a,t[1]),4&e&&f!==(f=t[2].doc+"")&&P(h,f),516&e&&u!==(u=t[9]?t[2].doc:void 0)&&L(c,"title",u),512&e&&A(c,"overflown",t[9]),8&e&&A(s,"success",t[3]),32&e&&A(s,"running",t[5]),16&e&&A(s,"error",t[4]),128&e){let i;for(g=t[7],i=0;i<g.length;i+=1){const s=Na(t,g,i);m[i]?m[i].p(s,e):(m[i]=Ba(s),m[i].c(),m[i].m(n,null))}for(;i<m.length;i+=1)m[i].d(1);m.length=g.length}},i:t,o:t,d(t){t&&_(n),p&&p.d(),e[12](null),e[13](null),v(m,t)}}}const Ha=4,Wa=3;function Ua(t,e,n){var i,s;let o,{name:r}=e,{step:a}=e,{numLevels:l=0}=e,{el:c}=e,h=!1,u=!1,d=!1;const f={3:3,100:4,1e3:5,1e4:6};let p=[];a.num_possible_tasks?(a.num_possible_tasks>1&&(o=(new Intl.NumberFormat).format(a.num_possible_tasks)),l=a.num_possible_tasks-1,Object.keys(f).forEach((t=>{const e=Number.parseInt(t);a.num_possible_tasks&&a.num_possible_tasks>e&&n(11,l=f[e])}))):l*=Wa,l>0&&(p=new Array(l).fill("")),p=p.map(((t,e)=>{var n,i;if(a.num_possible_tasks){const t=null!==(n=a.num_failed)&&void 0!==n?n:0,s=null!==(i=a.successful_tasks)&&void 0!==i?i:0;return(t-1)/a.num_possible_tasks>=(e+1)/p.length?"error":(t+s)/a.num_possible_tasks>=(e+1)/p.length?"success":"running"}return""}));const g=B(Fa),m=r===g;let b;a.failed||a.num_failed?u=!0:(null!==(i=a.num_possible_tasks)&&void 0!==i?i:0)>(null!==(s=a.successful_tasks)&&void 0!==s?s:0)?d=!0:a.num_possible_tasks&&a.num_possible_tasks===a.successful_tasks&&(h=!0);let x=!1;return F((()=>{n(9,x=Mt(b))})),t.$$set=t=>{"name"in t&&n(1,r=t.name),"step"in t&&n(2,a=t.step),"numLevels"in t&&n(11,l=t.numLevels),"el"in t&&n(0,c=t.el)},[c,r,a,h,u,d,o,p,b,x,m,l,function(t){H[t?"unshift":"push"]((()=>{b=t,n(8,b)}))},function(t){H[t?"unshift":"push"]((()=>{c=t,n(0,c)}))}]}class qa extends pt{constructor(t){super(),ft(this,t,Ua,Va,r,{name:1,step:2,numLevels:11,el:0})}}function Ya(t,e,n){const i=t.slice();return i[11]=e[n],i}function Za(t){let e,n,i,s,o,r;function a(e){t[8](e)}let l={name:t[2],numLevels:t[3],step:t[5]};void 0!==t[4]&&(l.el=t[4]),n=new qa({props:l}),H.push((()=>lt(n,"el",a)));let c=t[7]&&function(t){let e,n,i,s,o=t[5].next,r=[];for(let e=0;e<o.length;e+=1)r[e]=Xa(Ya(t,o,e));const a=t=>ot(r[t],1,1,(()=>{r[t]=null}));return{c(){e=$("div"),n=C(),i=$("div");for(let t=0;t<r.length;t+=1)r[t].c();L(e,"class","gap svelte-18aex7a"),L(i,"class","childwrapper svelte-18aex7a")},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(i,null);s=!0},p(t,e){if(99&e){let n;for(o=t[5].next,n=0;n<o.length;n+=1){const s=Ya(t,o,n);r[n]?(r[n].p(s,e),st(r[n],1)):(r[n]=Xa(s),r[n].c(),st(r[n],1),r[n].m(i,null))}for(nt(),n=o.length;n<r.length;n+=1)a(n);it()}},i(t){if(!s){for(let t=0;t<o.length;t+=1)st(r[t]);s=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)ot(r[t]);s=!1},d(t){t&&_(e),t&&_(n),t&&_(i),v(r,t)}}}(t),h=t[5].box_ends&&function(t){let e,n,i,s;return i=new Ja({props:{steps:t[1],stepName:t[5].box_ends,levels:t[3],boxes:t[0]}}),{c(){e=$("div"),n=C(),ct(i.$$.fragment),L(e,"class","gap svelte-18aex7a")},m(t,o){y(t,e,o),y(t,n,o),ht(i,t,o),s=!0},p(t,e){const n={};2&e&&(n.steps=t[1]),8&e&&(n.levels=t[3]),1&e&&(n.boxes=t[0]),i.$set(n)},i(t){s||(st(i.$$.fragment,t),s=!0)},o(t){ot(i.$$.fragment,t),s=!1},d(t){t&&_(e),t&&_(n),ut(i,t)}}}(t);return{c(){e=$("div"),ct(n.$$.fragment),s=C(),c&&c.c(),o=C(),h&&h.c(),L(e,"class","stepwrapper svelte-18aex7a")},m(t,i){y(t,e,i),ht(n,e,null),x(e,s),c&&c.m(e,null),x(e,o),h&&h.m(e,null),r=!0},p(t,e){const s={};4&e&&(s.name=t[2]),8&e&&(s.numLevels=t[3]),!i&&16&e&&(i=!0,s.el=t[4],X((()=>i=!1))),n.$set(s),t[7]&&c.p(t,e),t[5].box_ends&&h.p(t,e)},i(t){r||(st(n.$$.fragment,t),st(c),st(h),r=!0)},o(t){ot(n.$$.fragment,t),ot(c),ot(h),r=!1},d(t){t&&_(e),ut(n),c&&c.d(),h&&h.d()}}}function Xa(t){let e,n;return e=new Ja({props:{steps:t[1],stepName:t[11],levels:t[6],boxes:t[0]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};2&n&&(i.steps=t[1]),1&n&&(i.boxes=t[0]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ga(t){let e,n,i=t[5]&&Za(t);return{c(){i&&i.c(),e=M()},m(t,s){i&&i.m(t,s),y(t,e,s),n=!0},p(t,[e]){t[5]&&i.p(t,e)},i(t){n||(st(i),n=!0)},o(t){ot(i),n=!1},d(t){i&&i.d(t),t&&_(e)}}}function Ka(t,e,n){var i;let{steps:s}=e,{stepName:o}=e,{levels:r=0}=e,{boxes:a={}}=e,l=null;F((()=>{l&&n(0,a[o]=l,a)}));let c=s[o];c||console.warn("step ",o," not found");const h="foreach"===(null==c?void 0:c.type)?r+1:"join"===(null==c?void 0:c.type)?r-1:r;let u=null===(i=null==c?void 0:c.next)||void 0===i?void 0:i.find((t=>{var e;return"join"!==(null===(e=s[t])||void 0===e?void 0:e.type)}));return t.$$set=t=>{"steps"in t&&n(1,s=t.steps),"stepName"in t&&n(2,o=t.stepName),"levels"in t&&n(3,r=t.levels),"boxes"in t&&n(0,a=t.boxes)},[a,s,o,r,l,c,h,u,function(t){l=t,n(4,l)}]}class Ja extends pt{constructor(t){super(),ft(this,t,Ka,Ga,r,{steps:1,stepName:2,levels:3,boxes:0})}}function Qa(e){let n;return{c(){n=$("p"),n.textContent="No start step"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&_(n)}}}function tl(t){let e,n,i;function s(e){t[6](e)}let o={steps:t[3],stepName:"start"};return void 0!==t[0]&&(o.boxes=t[0]),e=new Ja({props:o}),H.push((()=>lt(e,"boxes",s))),{c(){ct(e.$$.fragment)},m(t,n){ht(e,t,n),i=!0},p(t,i){const s={};!n&&1&i&&(n=!0,s.boxes=t[0],X((()=>n=!1))),e.$set(s)},i(t){i||(st(e.$$.fragment,t),i=!0)},o(t){ot(e.$$.fragment,t),i=!1},d(t){ut(e,t)}}}function el(t){let e,n;return e=new Ia({props:{boxes:t[0],steps:t[3],container:t[1]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.boxes=t[0]),2&n&&(i.container=t[1]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function nl(t){let e,n,i,s,o,r,a,l=!t[2]&&Object.keys(t[0]).length;const c=[tl,Qa],h=[];n=function(t,e){return t[3]?.start?0:1}(t),i=h[n]=c[n](t);let u=l&&el(t);return{c(){e=$("div"),i.c(),s=C(),u&&u.c(),O(e,"position","relative"),O(e,"line-height","1"),L(e,"data-component","dag")},m(i,l){y(i,e,l),h[n].m(e,null),x(e,s),u&&u.m(e,null),t[7](e),o=!0,r||(a=S(window,"resize",t[4]),r=!0)},p(t,[n]){i.p(t,n),5&n&&(l=!t[2]&&Object.keys(t[0]).length),l?u?(u.p(t,n),5&n&&st(u,1)):(u=el(t),u.c(),st(u,1),u.m(e,null)):u&&(nt(),ot(u,1,1,(()=>{u=null})),it())},i(t){o||(st(i),st(u),o=!0)},o(t){ot(i),ot(u),o=!1},d(i){i&&_(e),h[n].d(),u&&u.d(),t[7](null),r=!1,a()}}}const il=100;function sl(t,e,n){let i;var s;c(t,_t,(t=>n(10,i=t)));let{componentData:o}=e;const{data:r}=o;let a,l,h={};j(Fa,Ct(null===(s=null==i?void 0:i.metadata)||void 0===s?void 0:s.pathspec,"stepname"));let u=!1;return t.$$set=t=>{"componentData"in t&&n(5,o=t.componentData)},[h,a,u,r,()=>{n(2,u=!0),clearTimeout(l),l=setTimeout((()=>{n(2,u=!1)}),il)},o,function(t){h=t,n(0,h)},function(t){H[t?"unshift":"push"]((()=>{a=t,n(1,a)}))}]}class ol extends pt{constructor(t){super(),ft(this,t,sl,nl,r,{componentData:5})}}function rl(e){let n;return{c(){n=$("h2"),n.textContent=`${e[0]}`,L(n,"class","title svelte-117s0ws"),L(n,"data-component","title")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&_(n)}}}function al(t,e,n){let{componentData:i}=e;const{text:s}=i;return t.$$set=t=>{"componentData"in t&&n(1,i=t.componentData)},[s,i]}class ll extends pt{constructor(t){super(),ft(this,t,al,rl,r,{componentData:1})}}function cl(e){let n,i,s=e[0].text+"";return{c(){n=$("p"),i=w(s),L(n,"class","subtitle svelte-lu9pnn"),L(n,"data-component","subtitle")},m(t,e){y(t,n,e),x(n,i)},p(t,[e]){1&e&&s!==(s=t[0].text+"")&&P(i,s)},i:t,o:t,d(t){t&&_(n)}}}function hl(t,e,n){let{componentData:i}=e;return t.$$set=t=>{"componentData"in t&&n(0,i=t.componentData)},[i]}class ul extends pt{constructor(t){super(),ft(this,t,hl,cl,r,{componentData:0})}}function dl(e){let n,i,s,o=e[0]&&function(e){let n,i;return n=new ll({props:{componentData:{type:"title",text:e[0]}}}),{c(){ct(n.$$.fragment)},m(t,e){ht(n,t,e),i=!0},p:t,i(t){i||(st(n.$$.fragment,t),i=!0)},o(t){ot(n.$$.fragment,t),i=!1},d(t){ut(n,t)}}}(e),r=e[1]&&function(e){let n,i;return n=new ul({props:{componentData:{type:"subtitle",text:e[1]}}}),{c(){ct(n.$$.fragment)},m(t,e){ht(n,t,e),i=!0},p:t,i(t){i||(st(n.$$.fragment,t),i=!0)},o(t){ot(n.$$.fragment,t),i=!1},d(t){ut(n,t)}}}(e);return{c(){n=$("header"),o&&o.c(),i=C(),r&&r.c(),L(n,"class","container svelte-1ugmt5d"),L(n,"data-component","heading")},m(t,e){y(t,n,e),o&&o.m(n,null),x(n,i),r&&r.m(n,null),s=!0},p(t,[e]){t[0]&&o.p(t,e),t[1]&&r.p(t,e)},i(t){s||(st(o),st(r),s=!0)},o(t){ot(o),ot(r),s=!1},d(t){t&&_(n),o&&o.d(),r&&r.d()}}}function fl(t,e,n){let{componentData:i}=e;const{title:s,subtitle:o}=i;return t.$$set=t=>{"componentData"in t&&n(2,i=t.componentData)},[s,o,i]}class pl extends pt{constructor(t){super(),ft(this,t,fl,dl,r,{componentData:2})}}function gl(e){let n,i,s,o,r,a,c,h,u=e[2]&&function(e){let n;return{c(){n=$("div"),n.textContent=`${e[2]}`,L(n,"class","label svelte-1x96yvr")},m(t,e){y(t,n,e)},p:t,d(t){t&&_(n)}}}(e),d=e[3]&&function(e){let n;return{c(){n=$("figcaption"),n.textContent=`${e[3]}`,L(n,"class","description svelte-1x96yvr")},m(t,e){y(t,n,e)},p:t,d(t){t&&_(n)}}}(e);return{c(){n=$("figure"),i=$("div"),s=$("img"),r=C(),u&&u.c(),a=C(),d&&d.c(),l(s.src,o=e[1])||L(s,"src",o),L(s,"alt",e[2]||"image"),L(s,"class","svelte-1x96yvr"),L(i,"class","imageContainer"),L(n,"data-component","image"),L(n,"class","svelte-1x96yvr")},m(t,o){y(t,n,o),x(n,i),x(i,s),x(n,r),u&&u.m(n,null),x(n,a),d&&d.m(n,null),c||(h=S(n,"click",e[4]),c=!0)},p(t,[e]){t[2]&&u.p(t,e),t[3]&&d.p(t,e)},i:t,o:t,d(t){t&&_(n),u&&u.d(),d&&d.d(),c=!1,h()}}}function ml(t,e,n){let{componentData:i}=e;const{src:s,label:o,description:r}=i;return t.$$set=t=>{"componentData"in t&&n(0,i=t.componentData)},[i,s,o,r,()=>$t.set(i)]}class bl extends pt{constructor(t){super(),ft(this,t,ml,gl,r,{componentData:0})}}function xl(e){let n,i;return{c(){n=$("div"),i=$("canvas"),L(n,"data-component","line-chart")},m(t,s){y(t,n,s),x(n,i),e[2](i)},p:t,i:t,o:t,d(t){t&&_(n),e[2](null)}}}function yl(t,e,n){dr.register(Dr,ea,zs,Kr,Or);let{componentData:i}=e;const{config:s,data:o,labels:r}=i;let a;const l=s||{type:"line",data:{labels:r,datasets:[{backgroundColor:ka[2],borderColor:ka[2],data:o||[]}]},options:{plugins:{legend:{display:!1}}}};return t.$$set=t=>{"componentData"in t&&n(1,i=t.componentData)},t.$$.update=()=>{1&t.$$.dirty&&a&&new dr(a,l)},[a,i,function(t){H[t?"unshift":"push"]((()=>{a=t,n(0,a)}))}]}class _l extends pt{constructor(t){super(),ft(this,t,yl,xl,r,{componentData:1})}}function vl(e){let n,i,s,o,r,a,l,c=e[0].data+"";return{c(){n=$("pre"),i=w(" \n "),s=$("code"),o=w("\n "),r=w(c),a=w("\n "),l=w("\n"),L(s,"class","mono language-log"),L(n,"class","log svelte-1jhmsu"),L(n,"data-component","log")},m(t,c){y(t,n,c),x(n,i),x(n,s),x(s,o),x(s,r),x(s,a),e[2](s),x(n,l)},p(t,[e]){1&e&&c!==(c=t[0].data+"")&&P(r,c)},i:t,o:t,d(t){t&&_(n),e[2](null)}}}function $l(t,e,n){let i,{componentData:s}=e;return t.$$set=t=>{"componentData"in t&&n(0,s=t.componentData)},t.$$.update=()=>{2&t.$$.dirty&&i&&function(){var t;i&&(null===(t=null===window||void 0===window?void 0:window.Prism)||void 0===t||t.highlightElement(i))}()},[s,i,function(t){H[t?"unshift":"push"]((()=>{i=t,n(1,i)}))}]}class kl extends pt{constructor(t){super(),ft(this,t,$l,vl,r,{componentData:0})}}function wl(t,e,n){const i=t.slice();return i[18]=e[n],i}function Cl(t,e,n){const i=t.slice();return i[18]=e[n],i}function Ml(t,e,n){const i=t.slice();return i[10]=e[n],i}function Sl(t,e,n){const i=t.slice();return i[13]=e[n],i[15]=n,i}function Ll(t,e,n){const i=t.slice();return i[16]=e[n],i[15]=n,i}function Dl(t,e,n){const i=t.slice();return i[7]=e[n],i}function Pl(t){let e,n,i,s;const o=[Tl,El,Al],r=[];function a(t,e){return"table"===t[0]?0:"list"===t[0]?1:2}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,s){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Ol(t){let e,n,i=t[1],s=[];for(let e=0;e<i.length;e+=1)s[e]=nc(Dl(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(34&n){let r;for(i=t[1],r=0;r<i.length;r+=1){const o=Dl(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=nc(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function Al(t){let n,i,s;const o=[t[6]];var r=t[5][t[0]];function a(t){let n={$$slots:{default:[Il]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=e(n,o[t]);return{props:n}}return r&&(n=T(r,a(t))),{c(){n&&ct(n.$$.fragment),i=M()},m(t,e){n&&ht(n,t,e),y(t,i,e),s=!0},p(t,e){const s=64&e?rt(o,[at(t[6])]):{};if(8388706&e&&(s.$$scope={dirty:e,ctx:t}),33&e&&r!==(r=t[5][t[0]])){if(n){nt();const t=n;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(n=T(r,a(t)),ct(n.$$.fragment),st(n.$$.fragment,1),ht(n,i.parentNode,i)):n=null}else r&&n.$set(s)},i(t){s||(n&&st(n.$$.fragment,t),s=!0)},o(t){n&&ot(n.$$.fragment,t),s=!1},d(t){t&&_(i),n&&ut(n,t)}}}function El(t){let e,n,i,s;const o=[Nl,Fl],r=[];function a(t,e){return t[4]?0:1}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,s){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Tl(t){let e,n,i;var s=t[5].table;function o(t){return{props:{$$slots:{default:[ec]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(8388716&i&&(r.$$scope={dirty:i,ctx:t}),32&i&&s!==(s=t[5].table)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Rl(e){let n,i=e[6].raw+"";return{c(){n=w(i)},m(t,e){y(t,n,e)},p(t,e){64&e&&i!==(i=t[6].raw+"")&&P(n,i)},i:t,o:t,d(t){t&&_(n)}}}function zl(t){let e,n;return e=new oc({props:{tokens:t[1],renderers:t[5]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};2&n&&(i.tokens=t[1]),32&n&&(i.renderers=t[5]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Il(t){let e,n,i,s;const o=[zl,Rl],r=[];function a(t,e){return t[1]?0:1}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,s){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Fl(t){let n,i,s;const o=[{ordered:t[4]},t[6]];var r=t[5].list;function a(t){let n={$$slots:{default:[Vl]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=e(n,o[t]);return{props:n}}return r&&(n=T(r,a(t))),{c(){n&&ct(n.$$.fragment),i=M()},m(t,e){n&&ht(n,t,e),y(t,i,e),s=!0},p(t,e){const s=80&e?rt(o,[16&e&&{ordered:t[4]},64&e&&at(t[6])]):{};if(8388704&e&&(s.$$scope={dirty:e,ctx:t}),32&e&&r!==(r=t[5].list)){if(n){nt();const t=n;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(n=T(r,a(t)),ct(n.$$.fragment),st(n.$$.fragment,1),ht(n,i.parentNode,i)):n=null}else r&&n.$set(s)},i(t){s||(n&&st(n.$$.fragment,t),s=!0)},o(t){n&&ot(n.$$.fragment,t),s=!1},d(t){t&&_(i),n&&ut(n,t)}}}function Nl(t){let n,i,s;const o=[{ordered:t[4]},t[6]];var r=t[5].list;function a(t){let n={$$slots:{default:[Ul]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=e(n,o[t]);return{props:n}}return r&&(n=T(r,a(t))),{c(){n&&ct(n.$$.fragment),i=M()},m(t,e){n&&ht(n,t,e),y(t,i,e),s=!0},p(t,e){const s=80&e?rt(o,[16&e&&{ordered:t[4]},64&e&&at(t[6])]):{};if(8388704&e&&(s.$$scope={dirty:e,ctx:t}),32&e&&r!==(r=t[5].list)){if(n){nt();const t=n;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(n=T(r,a(t)),ct(n.$$.fragment),st(n.$$.fragment,1),ht(n,i.parentNode,i)):n=null}else r&&n.$set(s)},i(t){s||(n&&st(n.$$.fragment,t),s=!0)},o(t){n&&ot(n.$$.fragment,t),s=!1},d(t){t&&_(i),n&&ut(n,t)}}}function jl(t){let e,n,i;return e=new oc({props:{tokens:t[18].tokens,renderers:t[5]}}),{c(){ct(e.$$.fragment),n=C()},m(t,s){ht(e,t,s),y(t,n,s),i=!0},p(t,n){const i={};64&n&&(i.tokens=t[18].tokens),32&n&&(i.renderers=t[5]),e.$set(i)},i(t){i||(st(e.$$.fragment,t),i=!0)},o(t){ot(e.$$.fragment,t),i=!1},d(t){ut(e,t),t&&_(n)}}}function Bl(t){let n,i,s;const o=[t[18]];var r=t[5].unorderedlistitem||t[5].listitem;function a(t){let n={$$slots:{default:[jl]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=e(n,o[t]);return{props:n}}return r&&(n=T(r,a(t))),{c(){n&&ct(n.$$.fragment),i=M()},m(t,e){n&&ht(n,t,e),y(t,i,e),s=!0},p(t,e){const s=64&e?rt(o,[at(t[18])]):{};if(8388704&e&&(s.$$scope={dirty:e,ctx:t}),32&e&&r!==(r=t[5].unorderedlistitem||t[5].listitem)){if(n){nt();const t=n;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(n=T(r,a(t)),ct(n.$$.fragment),st(n.$$.fragment,1),ht(n,i.parentNode,i)):n=null}else r&&n.$set(s)},i(t){s||(n&&st(n.$$.fragment,t),s=!0)},o(t){n&&ot(n.$$.fragment,t),s=!1},d(t){t&&_(i),n&&ut(n,t)}}}function Vl(t){let e,n,i=t[6].items,s=[];for(let e=0;e<i.length;e+=1)s[e]=Bl(wl(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(96&n){let r;for(i=t[6].items,r=0;r<i.length;r+=1){const o=wl(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Bl(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function Hl(t){let e,n,i;return e=new oc({props:{tokens:t[18].tokens,renderers:t[5]}}),{c(){ct(e.$$.fragment),n=C()},m(t,s){ht(e,t,s),y(t,n,s),i=!0},p(t,n){const i={};64&n&&(i.tokens=t[18].tokens),32&n&&(i.renderers=t[5]),e.$set(i)},i(t){i||(st(e.$$.fragment,t),i=!0)},o(t){ot(e.$$.fragment,t),i=!1},d(t){ut(e,t),t&&_(n)}}}function Wl(t){let n,i,s;const o=[t[18]];var r=t[5].orderedlistitem||t[5].listitem;function a(t){let n={$$slots:{default:[Hl]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=e(n,o[t]);return{props:n}}return r&&(n=T(r,a(t))),{c(){n&&ct(n.$$.fragment),i=M()},m(t,e){n&&ht(n,t,e),y(t,i,e),s=!0},p(t,e){const s=64&e?rt(o,[at(t[18])]):{};if(8388704&e&&(s.$$scope={dirty:e,ctx:t}),32&e&&r!==(r=t[5].orderedlistitem||t[5].listitem)){if(n){nt();const t=n;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(n=T(r,a(t)),ct(n.$$.fragment),st(n.$$.fragment,1),ht(n,i.parentNode,i)):n=null}else r&&n.$set(s)},i(t){s||(n&&st(n.$$.fragment,t),s=!0)},o(t){n&&ot(n.$$.fragment,t),s=!1},d(t){t&&_(i),n&&ut(n,t)}}}function Ul(t){let e,n,i=t[6].items,s=[];for(let e=0;e<i.length;e+=1)s[e]=Wl(Cl(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(96&n){let r;for(i=t[6].items,r=0;r<i.length;r+=1){const o=Cl(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Wl(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function ql(t){let e,n,i;return e=new oc({props:{tokens:t[16].tokens,renderers:t[5]}}),{c(){ct(e.$$.fragment),n=C()},m(t,s){ht(e,t,s),y(t,n,s),i=!0},p(t,n){const i={};4&n&&(i.tokens=t[16].tokens),32&n&&(i.renderers=t[5]),e.$set(i)},i(t){i||(st(e.$$.fragment,t),i=!0)},o(t){ot(e.$$.fragment,t),i=!1},d(t){ut(e,t),t&&_(n)}}}function Yl(t){let e,n,i;var s=t[5].tablecell;function o(t){return{props:{header:!0,align:t[6].align[t[15]]||"center",$$slots:{default:[ql]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(64&i&&(r.align=t[6].align[t[15]]||"center"),8388644&i&&(r.$$scope={dirty:i,ctx:t}),32&i&&s!==(s=t[5].tablecell)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Zl(t){let e,n,i=t[2],s=[];for(let e=0;e<i.length;e+=1)s[e]=Yl(Ll(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(100&n){let r;for(i=t[2],r=0;r<i.length;r+=1){const o=Ll(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Yl(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function Xl(t){let e,n,i;var s=t[5].tablerow;function o(t){return{props:{$$slots:{default:[Zl]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(8388708&i&&(r.$$scope={dirty:i,ctx:t}),32&i&&s!==(s=t[5].tablerow)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Gl(t){let e,n;return e=new oc({props:{tokens:t[13].tokens,renderers:t[5]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};8&n&&(i.tokens=t[13].tokens),32&n&&(i.renderers=t[5]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Kl(t){let e,n,i;var s=t[5].tablecell;function o(t){return{props:{header:!1,align:t[6].align[t[15]]||"center",$$slots:{default:[Gl]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(64&i&&(r.align=t[6].align[t[15]]||"center"),8388648&i&&(r.$$scope={dirty:i,ctx:t}),32&i&&s!==(s=t[5].tablecell)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Jl(t){let e,n,i=t[10],s=[];for(let e=0;e<i.length;e+=1)s[e]=Kl(Sl(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=C()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(104&n){let r;for(i=t[10],r=0;r<i.length;r+=1){const o=Sl(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Kl(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function Ql(t){let e,n,i;var s=t[5].tablerow;function o(t){return{props:{$$slots:{default:[Jl]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(8388712&i&&(r.$$scope={dirty:i,ctx:t}),32&i&&s!==(s=t[5].tablerow)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function tc(t){let e,n,i=t[3],s=[];for(let e=0;e<i.length;e+=1)s[e]=Ql(Ml(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(104&n){let r;for(i=t[3],r=0;r<i.length;r+=1){const o=Ml(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Ql(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function ec(t){let e,n,i,s,o;var r=t[5].tablehead;function a(t){return{props:{$$slots:{default:[Xl]},$$scope:{ctx:t}}}}r&&(e=T(r,a(t)));var l=t[5].tablebody;function c(t){return{props:{$$slots:{default:[tc]},$$scope:{ctx:t}}}}return l&&(i=T(l,c(t))),{c(){e&&ct(e.$$.fragment),n=C(),i&&ct(i.$$.fragment),s=M()},m(t,r){e&&ht(e,t,r),y(t,n,r),i&&ht(i,t,r),y(t,s,r),o=!0},p(t,o){const h={};if(8388708&o&&(h.$$scope={dirty:o,ctx:t}),32&o&&r!==(r=t[5].tablehead)){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}r?(e=T(r,a(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else r&&e.$set(h);const u={};if(8388712&o&&(u.$$scope={dirty:o,ctx:t}),32&o&&l!==(l=t[5].tablebody)){if(i){nt();const t=i;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}l?(i=T(l,c(t)),ct(i.$$.fragment),st(i.$$.fragment,1),ht(i,s.parentNode,s)):i=null}else l&&i.$set(u)},i(t){o||(e&&st(e.$$.fragment,t),i&&st(i.$$.fragment,t),o=!0)},o(t){e&&ot(e.$$.fragment,t),i&&ot(i.$$.fragment,t),o=!1},d(t){e&&ut(e,t),t&&_(n),t&&_(s),i&&ut(i,t)}}}function nc(t){let n,i;const s=[t[7],{renderers:t[5]}];let o={};for(let t=0;t<s.length;t+=1)o=e(o,s[t]);return n=new oc({props:o}),{c(){ct(n.$$.fragment)},m(t,e){ht(n,t,e),i=!0},p(t,e){const i=34&e?rt(s,[2&e&&at(t[7]),32&e&&{renderers:t[5]}]):{};n.$set(i)},i(t){i||(st(n.$$.fragment,t),i=!0)},o(t){ot(n.$$.fragment,t),i=!1},d(t){ut(n,t)}}}function ic(t){let e,n,i,s;const o=[Ol,Pl],r=[];function a(t,e){return t[0]?t[5][t[0]]?1:-1:0}return~(e=a(t))&&(n=r[e]=o[e](t)),{c(){n&&n.c(),i=M()},m(t,n){~e&&r[e].m(t,n),y(t,i,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?~e&&r[e].p(t,s):(n&&(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it()),~e?(n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){~e&&r[e].d(t),t&&_(i)}}}function sc(t,n,i){const s=["type","tokens","header","rows","ordered","renderers"];let o=m(n,s),{type:r}=n,{tokens:a}=n,{header:l}=n,{rows:c}=n,{ordered:h=!1}=n,{renderers:u}=n;return function(){const t=console.warn;console.warn=e=>{e.includes("unknown prop")||e.includes("unexpected slot")||t(e)},F((()=>{console.warn=t}))}(),t.$$set=t=>{n=e(e({},n),g(t)),i(6,o=m(n,s)),"type"in t&&i(0,r=t.type),"tokens"in t&&i(1,a=t.tokens),"header"in t&&i(2,l=t.header),"rows"in t&&i(3,c=t.rows),"ordered"in t&&i(4,h=t.ordered),"renderers"in t&&i(5,u=t.renderers)},[r,a,l,c,h,u,o]}class oc extends pt{constructor(t){super(),ft(this,t,sc,ic,r,{type:0,tokens:1,header:2,rows:3,ordered:4,renderers:5})}}function rc(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let ac={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const lc=/[&<>"']/,cc=new RegExp(lc.source,"g"),hc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uc=new RegExp(hc.source,"g"),dc={"&":"&","<":"<",">":">",'"':""","'":"'"},fc=t=>dc[t];function pc(t,e){if(e){if(lc.test(t))return t.replace(cc,fc)}else if(hc.test(t))return t.replace(uc,fc);return t}const gc=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function mc(t){return t.replace(gc,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const bc=/(^|[^\[])\^/g;function xc(t,e){t="string"==typeof t?t:t.source,e=e||"";const n={replace:(e,i)=>(i=(i=i.source||i).replace(bc,"$1"),t=t.replace(e,i),n),getRegex:()=>new RegExp(t,e)};return n}const yc=/[^\w:]/g,_c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function vc(t,e,n){if(t){let t;try{t=decodeURIComponent(mc(n)).replace(yc,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!_c.test(n)&&(n=function(t,e){$c[" "+t]||(kc.test(t)?$c[" "+t]=t+"/":$c[" "+t]=Lc(t,"/",!0));t=$c[" "+t];const n=-1===t.indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(wc,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(Cc,"$1")+e:t+e}(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n}const $c={},kc=/^[^:]+:\/*[^/]*$/,wc=/^([^:]+:)[\s\S]*$/,Cc=/^([^:]+:\/*[^/]*)[\s\S]*$/;const Mc={exec:function(){}};function Sc(t,e){const n=t.replace(/\|/g,((t,e,n)=>{let i=!1,s=e;for(;--s>=0&&"\\"===n[s];)i=!i;return i?"|":" |"})),i=n.split(/ \|/);let s=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(/\\\|/g,"|");return i}function Lc(t,e,n){const i=t.length;if(0===i)return"";let s=0;for(;s<i;){const o=t.charAt(i-s-1);if(o!==e||n){if(o===e||!n)break;s++}else s++}return t.slice(0,i-s)}function Dc(t,e){if(e<1)return"";let n="";for(;e>1;)1&e&&(n+=t),e>>=1,t+=t;return n+t}function Pc(t,e,n,i){const s=e.href,o=e.title?pc(e.title):null,r=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;const t={type:"link",raw:n,href:s,title:o,text:r,tokens:i.inlineTokens(r)};return i.state.inLink=!1,t}return{type:"image",raw:n,href:s,title:o,text:pc(r)}}class Oc{constructor(t){this.options=t||ac}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Lc(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const i=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline._escapes,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=Lc(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(t);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:i,text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n,i,s,o,r,a,l,c,h,u,d,f,p=e[1].trim();const g=p.length>1,m={type:"list",raw:"",ordered:g,start:g?+p.slice(0,-1):"",loose:!1,items:[]};p=g?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=g?p:"[*+-]");const b=new RegExp(`^( {0,3}${p})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;t&&(f=!1,e=b.exec(t))&&!this.rules.block.hr.test(t);){if(n=e[0],t=t.substring(n.length),c=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=e[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=e[1].length),a=!1,!c&&/^ *$/.test(h)&&(n+=h+"\n",t=t.substring(h.length+1),f=!0),!f){const e=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;t&&(u=t.split("\n",1)[0],h=u,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!s.test(h))&&!r.test(h)&&!e.test(h)&&!i.test(t);){if(h.search(/[^ ]/)>=o||!h.trim())d+="\n"+h.slice(o);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(s.test(c))break;if(r.test(c))break;if(i.test(c))break;d+="\n"+h}a||h.trim()||(a=!0),n+=u+"\n",t=t.substring(u.length+1),c=h.slice(o)}}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(d),i&&(s="[ ] "!==i[0],d=d.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:n,task:!!i,checked:s,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();const x=m.items.length;for(r=0;r<x;r++)if(this.lexer.state.top=!1,m.items[r].tokens=this.lexer.blockTokens(m.items[r].text,[]),!m.loose){const t=m.items[r].tokens.filter((t=>"space"===t.type)),e=t.length>0&&t.some((t=>/\n.*\n/.test(t.raw)));m.loose=e}if(m.loose)for(r=0;r<x;r++)m.items[r].loose=!0;return m}}html(t){const e=this.rules.block.html.exec(t);if(e){const t={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(e[0]):pc(e[0]);t.type="paragraph",t.text=n,t.tokens=this.lexer.inline(n)}return t}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:Sc(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,i,s,o,r=t.align.length;for(n=0;n<r;n++)/^ *-+: *$/.test(t.align[n])?t.align[n]="right":/^ *:-+: *$/.test(t.align[n])?t.align[n]="center":/^ *:-+ *$/.test(t.align[n])?t.align[n]="left":t.align[n]=null;for(r=t.rows.length,n=0;n<r;n++)t.rows[n]=Sc(t.rows[n],t.header.length).map((t=>({text:t})));for(r=t.header.length,i=0;i<r;i++)t.header[i].tokens=this.lexer.inline(t.header[i].text);for(r=t.rows.length,i=0;i<r;i++)for(o=t.rows[i],s=0;s<o.length;s++)o[s].tokens=this.lexer.inline(o[s].text);return t}}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:pc(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):pc(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=Lc(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let i=0,s=0;for(;s<n;s++)if("\\"===t[s])s++;else if(t[s]===e[0])i++;else if(t[s]===e[1]&&(i--,i<0))return s;return-1}(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(t)?n.slice(1):n.slice(1,-1)),Pc(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:i?i.replace(this.rules.inline._escapes,"$1"):i},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return Pc(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i)return;if(i[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(""===n||this.rules.inline.punctuation.exec(n))){const n=i[0].length-1;let s,o,r=n,a=0;const l="*"===i[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=l.exec(e));){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=s.length,i[3]||i[4]){r+=o;continue}if((i[5]||i[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+a);const e=t.slice(0,n+i.index+(i[0].length-s.length)+o);if(Math.min(n,o)%2){const t=e.slice(1,-1);return{type:"em",raw:e,text:t,tokens:this.lexer.inlineTokens(t)}}const l=e.slice(2,-2);return{type:"strong",raw:e,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return n&&i&&(t=t.substring(1,t.length-1)),t=pc(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,i;return"@"===n[2]?(t=pc(this.options.mangle?e(n[1]):n[1]),i="mailto:"+t):(t=pc(n[1]),i=t),{type:"link",raw:n[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,i;if("@"===n[2])t=pc(this.options.mangle?e(n[0]):n[0]),i="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=pc(n[0]),i="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const n=this.rules.inline.text.exec(t);if(n){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):pc(n[0]):n[0]:pc(this.options.smartypants?e(n[0]):n[0]),{type:"text",raw:n[0],text:t}}}}const Ac={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Mc,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Ac.def=xc(Ac.def).replace("label",Ac._label).replace("title",Ac._title).getRegex(),Ac.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ac.listItemStart=xc(/^( *)(bull) */).replace("bull",Ac.bullet).getRegex(),Ac.list=xc(Ac.list).replace(/bull/g,Ac.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ac.def.source+")").getRegex(),Ac._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ac._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ac.html=xc(Ac.html,"i").replace("comment",Ac._comment).replace("tag",Ac._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ac.paragraph=xc(Ac._paragraph).replace("hr",Ac.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac._tag).getRegex(),Ac.blockquote=xc(Ac.blockquote).replace("paragraph",Ac.paragraph).getRegex(),Ac.normal={...Ac},Ac.gfm={...Ac.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Ac.gfm.table=xc(Ac.gfm.table).replace("hr",Ac.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac._tag).getRegex(),Ac.gfm.paragraph=xc(Ac._paragraph).replace("hr",Ac.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ac.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ac._tag).getRegex(),Ac.pedantic={...Ac.normal,html:xc("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ac._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Mc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xc(Ac.normal._paragraph).replace("hr",Ac.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ac.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Ec={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Mc,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Mc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function Tc(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Rc(t){let e,n,i="";const s=t.length;for(e=0;e<s;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}Ec._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ec.punctuation=xc(Ec.punctuation).replace(/punctuation/g,Ec._punctuation).getRegex(),Ec.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ec.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Ec._comment=xc(Ac._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ec.emStrong.lDelim=xc(Ec.emStrong.lDelim).replace(/punct/g,Ec._punctuation).getRegex(),Ec.emStrong.rDelimAst=xc(Ec.emStrong.rDelimAst,"g").replace(/punct/g,Ec._punctuation).getRegex(),Ec.emStrong.rDelimUnd=xc(Ec.emStrong.rDelimUnd,"g").replace(/punct/g,Ec._punctuation).getRegex(),Ec._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ec._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ec._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Ec.autolink=xc(Ec.autolink).replace("scheme",Ec._scheme).replace("email",Ec._email).getRegex(),Ec._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ec.tag=xc(Ec.tag).replace("comment",Ec._comment).replace("attribute",Ec._attribute).getRegex(),Ec._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ec._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ec._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ec.link=xc(Ec.link).replace("label",Ec._label).replace("href",Ec._href).replace("title",Ec._title).getRegex(),Ec.reflink=xc(Ec.reflink).replace("label",Ec._label).replace("ref",Ac._label).getRegex(),Ec.nolink=xc(Ec.nolink).replace("ref",Ac._label).getRegex(),Ec.reflinkSearch=xc(Ec.reflinkSearch,"g").replace("reflink",Ec.reflink).replace("nolink",Ec.nolink).getRegex(),Ec.normal={...Ec},Ec.pedantic={...Ec.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xc(/^!?\[(label)\]\((.*?)\)/).replace("label",Ec._label).getRegex(),reflink:xc(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ec._label).getRegex()},Ec.gfm={...Ec.normal,escape:xc(Ec.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ec.gfm.url=xc(Ec.gfm.url,"i").replace("email",Ec.gfm._extended_email).getRegex(),Ec.breaks={...Ec.gfm,br:xc(Ec.br).replace("{2,}","*").getRegex(),text:xc(Ec.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class zc{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ac,this.options.tokenizer=this.options.tokenizer||new Oc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Ac.normal,inline:Ec.normal};this.options.pedantic?(e.block=Ac.pedantic,e.inline=Ec.pedantic):this.options.gfm&&(e.block=Ac.gfm,this.options.breaks?e.inline=Ec.breaks:e.inline=Ec.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ac,inline:Ec}}static lex(t,e){return new zc(e).lex(t)}static lexInline(t,e){return new zc(e).inlineTokens(t)}lex(t){let e;for(t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);e=this.inlineQueue.shift();)this.inlineTokens(e.src,e.tokens);return this.tokens}blockTokens(t,e=[]){let n,i,s,o;for(t=this.options.pedantic?t.replace(/\t/g," ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,((t,e,n)=>e+" ".repeat(n.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?e.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(s=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let i;this.options.extensions.startBlock.forEach((function(t){i=t.call({lexer:this},n),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))i=e[e.length-1],o&&"paragraph"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),o=s.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),i=e[e.length-1],i&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,s,o,r,a,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+Dc("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+Dc("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index+o[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),i=e[e.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),i=e[e.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,l,a))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,Rc))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,Rc))){if(s=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let i;this.options.extensions.startInline.forEach((function(t){i=t.call({lexer:this},n),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(s,Tc))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),r=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}}class Ic{constructor(t){this.options=t||ac}code(t,e,n){const i=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,i);null!=e&&e!==t&&(n=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",i?'<pre><code class="'+this.options.langPrefix+pc(i)+'">'+(n?t:pc(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:pc(t,!0))+"</code></pre>\n"}blockquote(t){return`<blockquote>\n${t}</blockquote>\n`}html(t){return t}heading(t,e,n,i){if(this.options.headerIds){return`<h${e} id="${this.options.headerPrefix+i.slug(n)}">${t}</h${e}>\n`}return`<h${e}>${t}</h${e}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(t,e,n){const i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+i+">\n"}listitem(t){return`<li>${t}</li>\n`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>\n`}table(t,e){return e&&(e=`<tbody>${e}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return`<tr>\n${t}</tr>\n`}tablecell(t,e){const n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,e,n){if(null===(t=vc(this.options.sanitize,this.options.baseUrl,t)))return n;let i='<a href="'+t+'"';return e&&(i+=' title="'+e+'"'),i+=">"+n+"</a>",i}image(t,e,n){if(null===(t=vc(this.options.sanitize,this.options.baseUrl,t)))return n;let i=`<img src="${t}" alt="${n}"`;return e&&(i+=` title="${e}"`),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class Fc{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class Nc{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let n=t,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[t];do{i++,n=t+"-"+i}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=i,this.seen[n]=0),n}slug(t,e={}){const n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}class jc{constructor(t){this.options=t||ac,this.options.renderer=this.options.renderer||new Ic,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Fc,this.slugger=new Nc}static parse(t,e){return new jc(e).parse(t)}static parseInline(t,e){return new jc(e).parseInline(t)}parse(t,e=!0){let n,i,s,o,r,a,l,c,h,u,d,f,p,g,m,b,x,y,_,v="";const $=t.length;for(n=0;n<$;n++)if(u=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(_=this.options.extensions.renderers[u.type].call({parser:this},u),!1!==_||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))v+=_||"";else switch(u.type){case"space":continue;case"hr":v+=this.renderer.hr();continue;case"heading":v+=this.renderer.heading(this.parseInline(u.tokens),u.depth,mc(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":v+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(c="",l="",o=u.header.length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(u.header[i].tokens),{header:!0,align:u.align[i]});for(c+=this.renderer.tablerow(l),h="",o=u.rows.length,i=0;i<o;i++){for(a=u.rows[i],l="",r=a.length,s=0;s<r;s++)l+=this.renderer.tablecell(this.parseInline(a[s].tokens),{header:!1,align:u.align[s]});h+=this.renderer.tablerow(l)}v+=this.renderer.table(c,h);continue;case"blockquote":h=this.parse(u.tokens),v+=this.renderer.blockquote(h);continue;case"list":for(d=u.ordered,f=u.start,p=u.loose,o=u.items.length,h="",i=0;i<o;i++)m=u.items[i],b=m.checked,x=m.task,g="",m.task&&(y=this.renderer.checkbox(b),p?m.tokens.length>0&&"paragraph"===m.tokens[0].type?(m.tokens[0].text=y+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=y+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:y}):g+=y),g+=this.parse(m.tokens,p),h+=this.renderer.listitem(g,x,b);v+=this.renderer.list(h,d,f);continue;case"html":v+=this.renderer.html(u.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(h=u.tokens?this.parseInline(u.tokens):u.text;n+1<$&&"text"===t[n+1].type;)u=t[++n],h+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);v+=e?this.renderer.paragraph(h):h;continue;default:{const t='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return v}parseInline(t,e){e=e||this.renderer;let n,i,s,o="";const r=t.length;for(n=0;n<r;n++)if(i=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(s=this.options.extensions.renderers[i.type].call({parser:this},i),!1!==s||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)))o+=s||"";else switch(i.type){case"escape":case"text":o+=e.text(i.text);break;case"html":o+=e.html(i.text);break;case"link":o+=e.link(i.href,i.title,this.parseInline(i.tokens,e));break;case"image":o+=e.image(i.href,i.title,i.text);break;case"strong":o+=e.strong(this.parseInline(i.tokens,e));break;case"em":o+=e.em(this.parseInline(i.tokens,e));break;case"codespan":o+=e.codespan(i.text);break;case"br":o+=e.br();break;case"del":o+=e.del(this.parseInline(i.tokens,e));break;default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return o}}class Bc{constructor(t){this.options=t||ac}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}}function Vc(t,e){return(n,i,s)=>{"function"==typeof i&&(s=i,i=null);const o={...i},r=function(t,e,n){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+pc(i.message+"",!0)+"</pre>";return e?Promise.resolve(t):n?void n(null,t):t}if(e)return Promise.reject(i);if(!n)throw i;n(i)}}((i={...Hc.defaults,...o}).silent,i.async,s);if(null==n)return r(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(i),i.hooks&&(i.hooks.options=i),s){const o=i.highlight;let a;try{i.hooks&&(n=i.hooks.preprocess(n)),a=t(n,i)}catch(t){return r(t)}const l=function(t){let n;if(!t)try{i.walkTokens&&Hc.walkTokens(a,i.walkTokens),n=e(a,i),i.hooks&&(n=i.hooks.postprocess(n))}catch(e){t=e}return i.highlight=o,t?r(t):s(null,n)};if(!o||o.length<3)return l();if(delete i.highlight,!a.length)return l();let c=0;return Hc.walkTokens(a,(function(t){"code"===t.type&&(c++,setTimeout((()=>{o(t.text,t.lang,(function(e,n){if(e)return l(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),c--,0===c&&l()}))}),0))})),void(0===c&&l())}if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then((e=>t(e,i))).then((t=>i.walkTokens?Promise.all(Hc.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>e(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(r);try{i.hooks&&(n=i.hooks.preprocess(n));const s=t(n,i);i.walkTokens&&Hc.walkTokens(s,i.walkTokens);let o=e(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(t){return r(t)}}}function Hc(t,e,n){return Vc(zc.lex,jc.parse)(t,e,n)}Hc.options=Hc.setOptions=function(t){var e;return Hc.defaults={...Hc.defaults,...t},e=Hc.defaults,ac=e,Hc},Hc.getDefaults=rc,Hc.defaults=ac,Hc.use=function(...t){const e=Hc.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((t=>{const n={...t};if(n.async=Hc.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=n.apply(this,e)),i}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");e[t.level]?e[t.level].unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=Hc.defaults.renderer||new Ic;for(const n in t.renderer){const i=e[n];e[n]=(...s)=>{let o=t.renderer[n].apply(e,s);return!1===o&&(o=i.apply(e,s)),o}}n.renderer=e}if(t.tokenizer){const e=Hc.defaults.tokenizer||new Oc;for(const n in t.tokenizer){const i=e[n];e[n]=(...s)=>{let o=t.tokenizer[n].apply(e,s);return!1===o&&(o=i.apply(e,s)),o}}n.tokenizer=e}if(t.hooks){const e=Hc.defaults.hooks||new Bc;for(const n in t.hooks){const i=e[n];Bc.passThroughHooks.has(n)?e[n]=s=>{if(Hc.defaults.async)return Promise.resolve(t.hooks[n].call(e,s)).then((t=>i.call(e,t)));const o=t.hooks[n].call(e,s);return i.call(e,o)}:e[n]=(...s)=>{let o=t.hooks[n].apply(e,s);return!1===o&&(o=i.apply(e,s)),o}}n.hooks=e}if(t.walkTokens){const e=Hc.defaults.walkTokens;n.walkTokens=function(n){let i=[];return i.push(t.walkTokens.call(this,n)),e&&(i=i.concat(e.call(this,n))),i}}Hc.setOptions(n)}))},Hc.walkTokens=function(t,e){let n=[];for(const i of t)switch(n=n.concat(e.call(Hc,i)),i.type){case"table":for(const t of i.header)n=n.concat(Hc.walkTokens(t.tokens,e));for(const t of i.rows)for(const i of t)n=n.concat(Hc.walkTokens(i.tokens,e));break;case"list":n=n.concat(Hc.walkTokens(i.items,e));break;default:Hc.defaults.extensions&&Hc.defaults.extensions.childTokens&&Hc.defaults.extensions.childTokens[i.type]?Hc.defaults.extensions.childTokens[i.type].forEach((function(t){n=n.concat(Hc.walkTokens(i[t],e))})):i.tokens&&(n=n.concat(Hc.walkTokens(i.tokens,e)))}return n},Hc.parseInline=Vc(zc.lexInline,jc.parseInline),Hc.Parser=jc,Hc.parser=jc.parse,Hc.Renderer=Ic,Hc.TextRenderer=Fc,Hc.Lexer=zc,Hc.lexer=zc.lex,Hc.Tokenizer=Oc,Hc.Slugger=Nc,Hc.Hooks=Bc,Hc.parse=Hc,Hc.options,Hc.setOptions,Hc.use,Hc.walkTokens,Hc.parseInline;const Wc={};function Uc(e){let n;return{c(){n=w(e[1])},m(t,e){y(t,n,e)},p(t,e){2&e&&P(n,t[1])},i:t,o:t,d(t){t&&_(n)}}}function qc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h6"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Yc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h5"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Zc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h4"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Xc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h3"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Gc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h2"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Kc(t){let e,n;const i=t[5].default,s=h(i,t,t[4],null);return{c(){e=$("h1"),s&&s.c(),L(e,"id",t[2])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||16&o)&&f(s,i,t,t[4],n?d(i,t[4],o,null):p(t[4]),null),(!n||4&o)&&L(e,"id",t[2])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Jc(t){let e,n,i,s;const o=[Kc,Gc,Xc,Zc,Yc,qc,Uc],r=[];function a(t,e){return 1===t[0]?0:2===t[0]?1:3===t[0]?2:4===t[0]?3:5===t[0]?4:6===t[0]?5:6}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Qc(t,e,n){let i,{$$slots:s={},$$scope:o}=e,{depth:r}=e,{raw:a}=e,{text:l}=e;const{slug:c,getOptions:h}=B(Wc),u=h();return t.$$set=t=>{"depth"in t&&n(0,r=t.depth),"raw"in t&&n(1,a=t.raw),"text"in t&&n(3,l=t.text),"$$scope"in t&&n(4,o=t.$$scope)},t.$$.update=()=>{8&t.$$.dirty&&n(2,i=u.headerIds?u.headerPrefix+c(l):void 0)},[r,a,i,l,o,s]}function th(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("p"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function eh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function nh(t){let e;const n=t[3].default,i=h(n,t,t[2],null);return{c(){i&&i.c()},m(t,n){i&&i.m(t,n),e=!0},p(t,[s]){i&&i.p&&(!e||4&s)&&f(i,n,t,t[2],e?d(n,t[2],s,null):p(t[2]),null)},i(t){e||(st(i,t),e=!0)},o(t){ot(i,t),e=!1},d(t){i&&i.d(t)}}}function ih(t,e,n){let{$$slots:i={},$$scope:s}=e,{text:o}=e,{raw:r}=e;return t.$$set=t=>{"text"in t&&n(0,o=t.text),"raw"in t&&n(1,r=t.raw),"$$scope"in t&&n(2,s=t.$$scope)},[o,r,s,i]}function sh(e){let n,i;return{c(){n=$("img"),l(n.src,i=e[0])||L(n,"src",i),L(n,"title",e[1]),L(n,"alt",e[2])},m(t,e){y(t,n,e)},p(t,[e]){1&e&&!l(n.src,i=t[0])&&L(n,"src",i),2&e&&L(n,"title",t[1]),4&e&&L(n,"alt",t[2])},i:t,o:t,d(t){t&&_(n)}}}function oh(t,e,n){let{href:i=""}=e,{title:s}=e,{text:o=""}=e;return t.$$set=t=>{"href"in t&&n(0,i=t.href),"title"in t&&n(1,s=t.title),"text"in t&&n(2,o=t.text)},[i,s,o]}function rh(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("a"),s&&s.c(),L(e,"href",t[0]),L(e,"title",t[1])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[o]){s&&s.p&&(!n||4&o)&&f(s,i,t,t[2],n?d(i,t[2],o,null):p(t[2]),null),(!n||1&o)&&L(e,"href",t[0]),(!n||2&o)&&L(e,"title",t[1])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function ah(t,e,n){let{$$slots:i={},$$scope:s}=e,{href:o=""}=e,{title:r}=e;return t.$$set=t=>{"href"in t&&n(0,o=t.href),"title"in t&&n(1,r=t.title),"$$scope"in t&&n(2,s=t.$$scope)},[o,r,s,i]}function lh(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("em"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function ch(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function hh(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("del"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function uh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function dh(e){let n,i,s=e[0].replace(/`/g,"")+"";return{c(){n=$("code"),i=w(s)},m(t,e){y(t,n,e),x(n,i)},p(t,[e]){1&e&&s!==(s=t[0].replace(/`/g,"")+"")&&P(i,s)},i:t,o:t,d(t){t&&_(n)}}}function fh(t,e,n){let{raw:i}=e;return t.$$set=t=>{"raw"in t&&n(0,i=t.raw)},[i]}function ph(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("strong"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function gh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function mh(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("table"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function bh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function xh(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("thead"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function yh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function _h(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("tbody"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function vh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function $h(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("tr"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function kh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function wh(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("td"),s&&s.c(),L(e,"align",t[1])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||4&o)&&f(s,i,t,t[2],n?d(i,t[2],o,null):p(t[2]),null),(!n||2&o)&&L(e,"align",t[1])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Ch(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("th"),s&&s.c(),L(e,"align",t[1])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||4&o)&&f(s,i,t,t[2],n?d(i,t[2],o,null):p(t[2]),null),(!n||2&o)&&L(e,"align",t[1])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Mh(t){let e,n,i,s;const o=[Ch,wh],r=[];function a(t,e){return t[0]?0:1}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Sh(t,e,n){let{$$slots:i={},$$scope:s}=e,{header:o}=e,{align:r}=e;return t.$$set=t=>{"header"in t&&n(0,o=t.header),"align"in t&&n(1,r=t.align),"$$scope"in t&&n(2,s=t.$$scope)},[o,r,s,i]}function Lh(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("ul"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,e){s&&s.p&&(!n||4&e)&&f(s,i,t,t[2],n?d(i,t[2],e,null):p(t[2]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Dh(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("ol"),s&&s.c(),L(e,"start",t[1])},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,o){s&&s.p&&(!n||4&o)&&f(s,i,t,t[2],n?d(i,t[2],o,null):p(t[2]),null),(!n||2&o)&&L(e,"start",t[1])},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Ph(t){let e,n,i,s;const o=[Dh,Lh],r=[];function a(t,e){return t[0]?0:1}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function Oh(t,e,n){let{$$slots:i={},$$scope:s}=e,{ordered:o}=e,{start:r}=e;return t.$$set=t=>{"ordered"in t&&n(0,o=t.ordered),"start"in t&&n(1,r=t.start),"$$scope"in t&&n(2,s=t.$$scope)},[o,r,s,i]}function Ah(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("li"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Eh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function Th(e){let n;return{c(){n=$("hr")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&_(n)}}}function Rh(e){let n,i;return{c(){n=new E(!1),i=M(),n.a=i},m(t,s){n.m(e[0],t,s),y(t,i,s)},p(t,[e]){1&e&&n.p(t[0])},i:t,o:t,d(t){t&&_(i),t&&n.d()}}}function zh(t,e,n){let{text:i}=e;return t.$$set=t=>{"text"in t&&n(0,i=t.text)},[i]}function Ih(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("blockquote"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Fh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}function Nh(e){let n,i,s;return{c(){n=$("pre"),i=$("code"),s=w(e[1]),L(n,"class",e[0])},m(t,e){y(t,n,e),x(n,i),x(i,s)},p(t,[e]){2&e&&P(s,t[1]),1&e&&L(n,"class",t[0])},i:t,o:t,d(t){t&&_(n)}}}function jh(t,e,n){let{lang:i}=e,{text:s}=e;return t.$$set=t=>{"lang"in t&&n(0,i=t.lang),"text"in t&&n(1,s=t.text)},[i,s]}function Bh(t){let e,n;const i=t[1].default,s=h(i,t,t[0],null);return{c(){e=$("br"),s&&s.c()},m(t,i){y(t,e,i),s&&s.m(t,i),n=!0},p(t,[e]){s&&s.p&&(!n||1&e)&&f(s,i,t,t[0],n?d(i,t[0],e,null):p(t[0]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Vh(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}const Hh={heading:class extends pt{constructor(t){super(),ft(this,t,Qc,Jc,r,{depth:0,raw:1,text:3})}},paragraph:class extends pt{constructor(t){super(),ft(this,t,eh,th,r,{})}},text:class extends pt{constructor(t){super(),ft(this,t,ih,nh,r,{text:0,raw:1})}},image:class extends pt{constructor(t){super(),ft(this,t,oh,sh,r,{href:0,title:1,text:2})}},link:class extends pt{constructor(t){super(),ft(this,t,ah,rh,r,{href:0,title:1})}},em:class extends pt{constructor(t){super(),ft(this,t,ch,lh,r,{})}},strong:class extends pt{constructor(t){super(),ft(this,t,gh,ph,r,{})}},codespan:class extends pt{constructor(t){super(),ft(this,t,fh,dh,r,{raw:0})}},del:class extends pt{constructor(t){super(),ft(this,t,uh,hh,r,{})}},table:class extends pt{constructor(t){super(),ft(this,t,bh,mh,r,{})}},tablehead:class extends pt{constructor(t){super(),ft(this,t,yh,xh,r,{})}},tablebody:class extends pt{constructor(t){super(),ft(this,t,vh,_h,r,{})}},tablerow:class extends pt{constructor(t){super(),ft(this,t,kh,$h,r,{})}},tablecell:class extends pt{constructor(t){super(),ft(this,t,Sh,Mh,r,{header:0,align:1})}},list:class extends pt{constructor(t){super(),ft(this,t,Oh,Ph,r,{ordered:0,start:1})}},orderedlistitem:null,unorderedlistitem:null,listitem:class extends pt{constructor(t){super(),ft(this,t,Eh,Ah,r,{})}},hr:class extends pt{constructor(t){super(),ft(this,t,null,Th,r,{})}},html:class extends pt{constructor(t){super(),ft(this,t,zh,Rh,r,{text:0})}},blockquote:class extends pt{constructor(t){super(),ft(this,t,Fh,Ih,r,{})}},code:class extends pt{constructor(t){super(),ft(this,t,jh,Nh,r,{lang:0,text:1})}},br:class extends pt{constructor(t){super(),ft(this,t,Vh,Bh,r,{})}}},Wh={baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1};function Uh(t){let e,n;return e=new oc({props:{tokens:t[0],renderers:t[1]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,[n]){const i={};1&n&&(i.tokens=t[0]),2&n&&(i.renderers=t[1]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function qh(t,e,n){let i,s,o,r,{source:a=[]}=e,{renderers:l={}}=e,{options:c={}}=e,{isInline:h=!1}=e;const u=N();let d,f,p;return j(Wc,{slug:t=>s?s.slug(t):"",getOptions:()=>o}),F((()=>{n(7,p=!0)})),t.$$set=t=>{"source"in t&&n(2,a=t.source),"renderers"in t&&n(3,l=t.renderers),"options"in t&&n(4,c=t.options),"isInline"in t&&n(5,h=t.isInline)},t.$$.update=()=>{4&t.$$.dirty&&n(8,i=Array.isArray(a)),4&t.$$.dirty&&(s=a?new Nc:void 0),16&t.$$.dirty&&n(9,o={...Wh,...c}),869&t.$$.dirty&&(i?n(0,d=a):(n(6,f=new zc(o)),n(0,d=h?f.inlineTokens(a):f.lex(a)),u("parsed",{tokens:d}))),8&t.$$.dirty&&n(1,r={...Hh,...l}),385&t.$$.dirty&&p&&!i&&u("parsed",{tokens:d})},[d,r,a,l,c,h,f,p,i,o]}class Yh extends pt{constructor(t){super(),ft(this,t,qh,Uh,r,{source:2,renderers:3,options:4,isInline:5})}}function Zh(t){let e,n;return e=new Yh({props:{source:t[0].source}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,[n]){const i={};1&n&&(i.source=t[0].source),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Xh(t,e,n){let{componentData:i}=e;return t.$$set=t=>{"componentData"in t&&n(0,i=t.componentData)},[i]}class Gh extends pt{constructor(t){super(),ft(this,t,Xh,Zh,r,{componentData:0})}}function Kh(t){let e,n;const i=t[3].default,s=h(i,t,t[2],null);return{c(){e=$("div"),s&&s.c(),L(e,"id",`page-${t[0]||"No Title"}`),L(e,"class","page svelte-v7ihqd"),L(e,"data-component","page")},m(t,i){y(t,e,i),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||4&e)&&f(s,i,t,t[2],n?d(i,t[2],e,null):p(t[2]),null)},i(t){n||(st(s,t),n=!0)},o(t){ot(s,t),n=!1},d(t){t&&_(e),s&&s.d(t)}}}function Jh(t,e,n){let{$$slots:i={},$$scope:s}=e,{componentData:o}=e;const{title:r}=o;return t.$$set=t=>{"componentData"in t&&n(1,o=t.componentData),"$$scope"in t&&n(2,s=t.$$scope)},[r,o,s,i]}class Qh extends pt{constructor(t){super(),ft(this,t,Jh,Kh,r,{componentData:1})}}function tu(e){let n,i,s,o,r,a,l,c,u=e[1]&&function(e){let n;return{c(){n=$("h3"),n.textContent=`${e[1]}`},m(t,e){y(t,n,e)},p:t,d(t){t&&_(n)}}}(e),g=e[2]&&function(e){let n;return{c(){n=$("p"),n.textContent=`${e[2]}`,L(n,"class","description")},m(t,e){y(t,n,e)},p:t,d(t){t&&_(n)}}}(e);const m=e[6].default,b=h(m,e,e[5],null);return{c(){n=$("section"),i=$("div"),u&&u.c(),s=C(),g&&g.c(),o=C(),r=$("div"),b&&b.c(),a=C(),l=$("hr"),L(i,"class","heading svelte-17n0qr8"),L(r,"class","sectionItems svelte-17n0qr8"),L(r,"style",e[0]),L(l,"class","svelte-17n0qr8"),L(n,"class","container svelte-17n0qr8"),L(n,"data-component","section"),L(n,"data-section-id",e[1]),A(n,"columns",e[3])},m(t,e){y(t,n,e),x(n,i),u&&u.m(i,null),x(i,s),g&&g.m(i,null),x(n,o),x(n,r),b&&b.m(r,null),x(n,a),x(n,l),c=!0},p(t,[e]){t[1]&&u.p(t,e),t[2]&&g.p(t,e),b&&b.p&&(!c||32&e)&&f(b,m,t,t[5],c?d(m,t[5],e,null):p(t[5]),null),(!c||1&e)&&L(r,"style",t[0])},i(t){c||(st(b,t),c=!0)},o(t){ot(b,t),c=!1},d(t){t&&_(n),u&&u.d(),g&&g.d(),b&&b.d(t)}}}function eu(t,e,n){let{$$slots:i={},$$scope:s}=e,{componentData:o}=e;const{title:r,subtitle:a,columns:l}=o;let c;return l&&(c=`grid-template-columns: repeat(${l||1}, 1fr);`),t.$$set=t=>{"componentData"in t&&n(4,o=t.componentData),"$$scope"in t&&n(5,s=t.$$scope)},[c,r,a,l,o,s,i]}class nu extends pt{constructor(t){super(),ft(this,t,eu,tu,r,{componentData:4})}}function iu(e){let n;return{c(){n=$("p"),n.textContent=`${e[0]}`,L(n,"data-component","text")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&_(n)}}}function su(t,e,n){let{componentData:i}=e;const{text:s}=i;return t.$$set=t=>{"componentData"in t&&n(1,i=t.componentData)},[s,i]}class ou extends pt{constructor(t){super(),ft(this,t,su,iu,r,{componentData:1})}}function ru(e){let n;return{c(){n=w(e[0])},m(t,e){y(t,n,e)},p(t,e){1&e&&P(n,t[0])},i:t,o:t,d(t){t&&_(n)}}}function au(t){let e,n,i;var s=t[1];function o(t){return{props:{componentData:t[0]}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(1&i&&(r.componentData=t[0]),2&i&&s!==(s=t[1])){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function lu(t){let e,n,i,s;const o=[au,ru],r=[];function a(t,e){return t[1]?0:1}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}function cu(t,e,n){let i,{componentData:s}=e;const o={artifacts:Ht,barChart:Ma,dag:ol,heading:pl,image:bl,lineChart:_l,log:kl,markdown:Gh,text:ou},r=null==s?void 0:s.type;return r&&(i=null==o?void 0:o[r],i||console.error("Unknown component type: ",r)),t.$$set=t=>{"componentData"in t&&n(0,s=t.componentData)},[s,i]}class hu extends pt{constructor(t){super(),ft(this,t,cu,lu,r,{componentData:0})}}function uu(t,e,n){const i=t.slice();return i[3]=e[n],i[5]=n,i}function du(t,e,n){const i=t.slice();return i[6]=e[n],i}function fu(e){let n,i,s;return i=new hu({props:{componentData:e[6][e[5]]}}),{c(){n=$("td"),ct(i.$$.fragment),L(n,"class","svelte-gl9h79")},m(t,e){y(t,n,e),ht(i,n,null),s=!0},p:t,i(t){s||(st(i.$$.fragment,t),s=!0)},o(t){ot(i.$$.fragment,t),s=!1},d(t){t&&_(n),ut(i)}}}function pu(t){let e,n,i,s,o,r,a=t[3]+"",l=t[1],c=[];for(let e=0;e<l.length;e+=1)c[e]=fu(du(t,l,e));const h=t=>ot(c[t],1,1,(()=>{c[t]=null}));return{c(){e=$("tr"),n=$("td"),i=w(a),s=C();for(let t=0;t<c.length;t+=1)c[t].c();o=C(),L(n,"class","labelColumn svelte-gl9h79")},m(t,a){y(t,e,a),x(e,n),x(n,i),x(e,s);for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(e,null);x(e,o),r=!0},p(t,n){if(2&n){let i;for(l=t[1],i=0;i<l.length;i+=1){const s=du(t,l,i);c[i]?(c[i].p(s,n),st(c[i],1)):(c[i]=fu(s),c[i].c(),st(c[i],1),c[i].m(e,o))}for(nt(),i=l.length;i<c.length;i+=1)h(i);it()}},i(t){if(!r){for(let t=0;t<l.length;t+=1)st(c[t]);r=!0}},o(t){c=c.filter(Boolean);for(let t=0;t<c.length;t+=1)ot(c[t]);r=!1},d(t){t&&_(e),v(c,t)}}}function gu(t){let e,n,i=t[0]&&t[1]&&function(t){let e,n,i,s,o=t[0],r=[];for(let e=0;e<o.length;e+=1)r[e]=pu(uu(t,o,e));const a=t=>ot(r[t],1,1,(()=>{r[t]=null}));return{c(){e=$("div"),n=$("table"),i=$("tbody");for(let t=0;t<r.length;t+=1)r[t].c();L(e,"class","tableContainer"),L(e,"data-component","table-vertical")},m(t,o){y(t,e,o),x(e,n),x(n,i);for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(i,null);s=!0},p(t,e){if(3&e){let n;for(o=t[0],n=0;n<o.length;n+=1){const s=uu(t,o,n);r[n]?(r[n].p(s,e),st(r[n],1)):(r[n]=pu(s),r[n].c(),st(r[n],1),r[n].m(i,null))}for(nt(),n=o.length;n<r.length;n+=1)a(n);it()}},i(t){if(!s){for(let t=0;t<o.length;t+=1)st(r[t]);s=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)ot(r[t]);s=!1},d(t){t&&_(e),v(r,t)}}}(t);return{c(){i&&i.c(),e=M()},m(t,s){i&&i.m(t,s),y(t,e,s),n=!0},p(t,[e]){t[0]&&t[1]&&i.p(t,e)},i(t){n||(st(i),n=!0)},o(t){ot(i),n=!1},d(t){i&&i.d(t),t&&_(e)}}}function mu(t,e,n){let{componentData:i}=e;const{columns:s,data:o}=i;return t.$$set=t=>{"componentData"in t&&n(2,i=t.componentData)},[s,o,i]}class bu extends pt{constructor(t){super(),ft(this,t,mu,gu,r,{componentData:2})}}function xu(t,e,n){const i=t.slice();return i[3]=e[n],i}function yu(t,e,n){const i=t.slice();return i[6]=e[n],i}function _u(t,e,n){const i=t.slice();return i[9]=e[n],i}function vu(e){let n,i,s=e[9]+"";return{c(){n=$("th"),i=w(s),L(n,"class","svelte-q3hq57")},m(t,e){y(t,n,e),x(n,i)},p:t,d(t){t&&_(n)}}}function $u(e){let n,i,s;return i=new hu({props:{componentData:e[6]}}),{c(){n=$("td"),ct(i.$$.fragment)},m(t,e){y(t,n,e),ht(i,n,null),s=!0},p:t,i(t){s||(st(i.$$.fragment,t),s=!0)},o(t){ot(i.$$.fragment,t),s=!1},d(t){t&&_(n),ut(i)}}}function ku(t){let e,n,i,s=t[3],o=[];for(let e=0;e<s.length;e+=1)o[e]=$u(yu(t,s,e));const r=t=>ot(o[t],1,1,(()=>{o[t]=null}));return{c(){e=$("tr");for(let t=0;t<o.length;t+=1)o[t].c();n=C()},m(t,s){y(t,e,s);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null);x(e,n),i=!0},p(t,i){if(2&i){let a;for(s=t[3],a=0;a<s.length;a+=1){const r=yu(t,s,a);o[a]?(o[a].p(r,i),st(o[a],1)):(o[a]=$u(r),o[a].c(),st(o[a],1),o[a].m(e,n))}for(nt(),a=s.length;a<o.length;a+=1)r(a);it()}},i(t){if(!i){for(let t=0;t<s.length;t+=1)st(o[t]);i=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)ot(o[t]);i=!1},d(t){t&&_(e),v(o,t)}}}function wu(t){let e,n,i=t[0]&&t[1]&&function(t){let e,n,i,s,o,r,a,l=t[0],c=[];for(let e=0;e<l.length;e+=1)c[e]=vu(_u(t,l,e));let h=t[1],u=[];for(let e=0;e<h.length;e+=1)u[e]=ku(xu(t,h,e));const d=t=>ot(u[t],1,1,(()=>{u[t]=null}));return{c(){e=$("div"),n=$("table"),i=$("thead"),s=$("tr");for(let t=0;t<c.length;t+=1)c[t].c();o=C(),r=$("tbody");for(let t=0;t<u.length;t+=1)u[t].c();L(e,"class","tableContainer svelte-q3hq57"),L(e,"data-component","table-horizontal")},m(t,l){y(t,e,l),x(e,n),x(n,i),x(i,s);for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(s,null);x(n,o),x(n,r);for(let t=0;t<u.length;t+=1)u[t]&&u[t].m(r,null);a=!0},p(t,e){if(1&e){let n;for(l=t[0],n=0;n<l.length;n+=1){const i=_u(t,l,n);c[n]?c[n].p(i,e):(c[n]=vu(i),c[n].c(),c[n].m(s,null))}for(;n<c.length;n+=1)c[n].d(1);c.length=l.length}if(2&e){let n;for(h=t[1],n=0;n<h.length;n+=1){const i=xu(t,h,n);u[n]?(u[n].p(i,e),st(u[n],1)):(u[n]=ku(i),u[n].c(),st(u[n],1),u[n].m(r,null))}for(nt(),n=h.length;n<u.length;n+=1)d(n);it()}},i(t){if(!a){for(let t=0;t<h.length;t+=1)st(u[t]);a=!0}},o(t){u=u.filter(Boolean);for(let t=0;t<u.length;t+=1)ot(u[t]);a=!1},d(t){t&&_(e),v(c,t),v(u,t)}}}(t);return{c(){i&&i.c(),e=M()},m(t,s){i&&i.m(t,s),y(t,e,s),n=!0},p(t,[e]){t[0]&&t[1]&&i.p(t,e)},i(t){n||(st(i),n=!0)},o(t){ot(i),n=!1},d(t){i&&i.d(t),t&&_(e)}}}function Cu(t,e,n){let{componentData:i}=e;const{columns:s,data:o}=i;return t.$$set=t=>{"componentData"in t&&n(2,i=t.componentData)},[s,o,i]}class Mu extends pt{constructor(t){super(),ft(this,t,Cu,wu,r,{componentData:2})}}function Su(t){let e,n,i=t[1]&&t[2]&&function(t){let e,n,i;var s=t[3];function o(t){return{props:{componentData:t[0]}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(1&i&&(r.componentData=t[0]),s!==(s=t[3])){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}(t);return{c(){i&&i.c(),e=M()},m(t,s){i&&i.m(t,s),y(t,e,s),n=!0},p(t,[e]){t[1]&&t[2]&&i.p(t,e)},i(t){n||(st(i),n=!0)},o(t){ot(i),n=!1},d(t){i&&i.d(t),t&&_(e)}}}function Lu(t,e,n){let{componentData:i}=e;const{columns:s,data:o,vertical:r}=i,a=r?bu:Mu;return t.$$set=t=>{"componentData"in t&&n(0,i=t.componentData)},[i,s,o,a]}class Du extends pt{constructor(t){super(),ft(this,t,Lu,Su,r,{componentData:0})}}function Pu(t,e,n){const i=t.slice();return i[3]=e[n],i}function Ou(t){let e,n,i;var s=t[1];function o(t){return{props:{componentData:t[0]}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(1&i&&(r.componentData=t[0]),s!==(s=t[1])){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Au(t){let e,n,i;var s=t[1];function o(t){return{props:{componentData:t[0],$$slots:{default:[Tu]},$$scope:{ctx:t}}}}return s&&(e=T(s,o(t))),{c(){e&&ct(e.$$.fragment),n=M()},m(t,s){e&&ht(e,t,s),y(t,n,s),i=!0},p(t,i){const r={};if(1&i&&(r.componentData=t[0]),65&i&&(r.$$scope={dirty:i,ctx:t}),s!==(s=t[1])){if(e){nt();const t=e;ot(t.$$.fragment,1,0,(()=>{ut(t,1)})),it()}s?(e=T(s,o(t)),ct(e.$$.fragment),st(e.$$.fragment,1),ht(e,n.parentNode,n)):e=null}else s&&e.$set(r)},i(t){i||(e&&st(e.$$.fragment,t),i=!0)},o(t){e&&ot(e.$$.fragment,t),i=!1},d(t){t&&_(n),e&&ut(e,t)}}}function Eu(t){let e,n;return e=new Iu({props:{componentData:t[3]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.componentData=t[3]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Tu(t){let e,n,i=t[0].contents,s=[];for(let e=0;e<i.length;e+=1)s[e]=Eu(Pu(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0].contents,r=0;r<i.length;r+=1){const o=Pu(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Eu(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function Ru(t){let e,n,i=t[1]&&function(t){let e,n,i,s;const o=[Au,Ou],r=[];function a(t,e){return"page"!==t[0].type&&"section"!==t[0].type||!t[0]?.contents?1:0}return e=a(t),n=r[e]=o[e](t),{c(){n.c(),i=M()},m(t,n){r[e].m(t,n),y(t,i,n),s=!0},p(t,s){let l=e;e=a(t),e===l?r[e].p(t,s):(nt(),ot(r[l],1,1,(()=>{r[l]=null})),it(),n=r[e],n?n.p(t,s):(n=r[e]=o[e](t),n.c()),st(n,1),n.m(i.parentNode,i))},i(t){s||(st(n),s=!0)},o(t){ot(n),s=!1},d(t){r[e].d(t),t&&_(i)}}}(t);return{c(){i&&i.c(),e=M()},m(t,s){i&&i.m(t,s),y(t,e,s),n=!0},p(t,[e]){t[1]&&i.p(t,e)},i(t){n||(st(i),n=!0)},o(t){ot(i),n=!1},d(t){i&&i.d(t),t&&_(e)}}}function zu(t,e,n){let{componentData:i}=e;const s={artifacts:Ht,barChart:Ma,dag:ol,heading:pl,image:bl,lineChart:_l,log:kl,markdown:Gh,page:Qh,section:nu,subtitle:ul,table:Du,text:ou,title:ll};let o=null==s?void 0:s[i.type];return o||console.error("Unknown component type: ",i.type),t.$$set=t=>{"componentData"in t&&n(0,i=t.componentData)},[i,o]}class Iu extends pt{constructor(t){super(),ft(this,t,zu,Ru,r,{componentData:0})}}function Fu(t){let e,n,i;const s=t[1].default,o=h(s,t,t[0],null);return{c(){e=$("main"),n=$("div"),o&&o.c(),L(n,"class","mainContainer svelte-13ho8jo"),L(e,"class","svelte-13ho8jo")},m(t,s){y(t,e,s),x(e,n),o&&o.m(n,null),i=!0},p(t,[e]){o&&o.p&&(!i||1&e)&&f(o,s,t,t[0],i?d(s,t[0],e,null):p(t[0]),null)},i(t){i||(st(o,t),i=!0)},o(t){ot(o,t),i=!1},d(t){t&&_(e),o&&o.d(t)}}}function Nu(t,e,n){let{$$slots:i={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,i]}class ju extends pt{constructor(t){super(),ft(this,t,Nu,Fu,r,{})}}const Bu=/^[a-z0-9]+(-[a-z0-9]+)*$/,Vu=Object.freeze({left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1});function Hu(t){return{...Vu,...t}}const Wu=(t,e,n,i="")=>{const s=t.split(":");if("@"===t.slice(0,1)){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const t=s.pop(),n=s.pop(),o={provider:s.length>0?s[0]:i,prefix:n,name:t};return e&&!Uu(o)?null:o}const o=s[0],r=o.split("-");if(r.length>1){const t={provider:i,prefix:r.shift(),name:r.join("-")};return e&&!Uu(t)?null:t}if(n&&""===i){const t={provider:i,prefix:"",name:o};return e&&!Uu(t,n)?null:t}return null},Uu=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(Bu)||!(e&&""===t.prefix||t.prefix.match(Bu))||!t.name.match(Bu));function qu(t,e,n=!1){const i=function e(n,i){if(void 0!==t.icons[n])return Object.assign({},t.icons[n]);if(i>5)return null;const s=t.aliases;if(s&&void 0!==s[n]){const t=s[n],o=e(t.parent,i+1);return o?function(t,e){const n={...t};for(const t in Vu){const i=t;if(void 0!==e[i]){const t=e[i];if(void 0===n[i]){n[i]=t;continue}switch(i){case"rotate":n[i]=(n[i]+t)%4;break;case"hFlip":case"vFlip":n[i]=t!==n[i];break;default:n[i]=t}}}return n}(o,t):o}const o=t.chars;return!i&&o&&void 0!==o[n]?e(o[n],i+1):null}(e,0);if(i)for(const e in Vu)void 0===i[e]&&void 0!==t[e]&&(i[e]=t[e]);return i&&n?Hu(i):i}function Yu(t,e,n){n=n||{};const i=[];if("object"!=typeof t||"object"!=typeof t.icons)return i;t.not_found instanceof Array&&t.not_found.forEach((t=>{e(t,null),i.push(t)}));const s=t.icons;Object.keys(s).forEach((n=>{const s=qu(t,n,!0);s&&(e(n,s),i.push(n))}));const o=n.aliases||"all";if("none"!==o&&"object"==typeof t.aliases){const n=t.aliases;Object.keys(n).forEach((s=>{if("variations"===o&&function(t){for(const e in Vu)if(void 0!==t[e])return!0;return!1}(n[s]))return;const r=qu(t,s,!0);r&&(e(s,r),i.push(s))}))}return i}const Zu={provider:"string",aliases:"object",not_found:"object"};for(const t in Vu)Zu[t]=typeof Vu[t];function Xu(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;for(const e in Zu)if(void 0!==t[e]&&typeof t[e]!==Zu[e])return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(Bu)||"string"!=typeof e.body)return null;for(const t in Vu)if(void 0!==e[t]&&typeof e[t]!=typeof Vu[t])return null}const i=e.aliases;if(i)for(const t in i){const e=i[t],s=e.parent;if(!t.match(Bu)||"string"!=typeof s||!n[s]&&!i[s])return null;for(const t in Vu)if(void 0!==e[t]&&typeof e[t]!=typeof Vu[t])return null}return e}let Gu=Object.create(null);try{const t=window||self;t&&1===t._iconifyStorage.version&&(Gu=t._iconifyStorage.storage)}catch(t){}function Ku(t,e){void 0===Gu[t]&&(Gu[t]=Object.create(null));const n=Gu[t];return void 0===n[e]&&(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:Object.create(null)}}(t,e)),n[e]}function Ju(t,e){if(!Xu(e))return[];const n=Date.now();return Yu(e,((e,i)=>{i?t.icons[e]=i:t.missing[e]=n}))}let Qu=!1;function td(t){return"boolean"==typeof t&&(Qu=t),Qu}function ed(t,e){const n=Wu(t,!0,Qu);if(!n)return!1;return function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]=Object.freeze(Hu(n)),!0}catch(t){}return!1}(Ku(n.provider,n.prefix),n.name,e)}const nd=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});const id=/(-?[0-9.]*[0-9]+[0-9.]*)/g,sd=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function od(t,e,n){if(1===e)return t;if(n=void 0===n?100:n,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const i=t.split(id);if(null===i||!i.length)return t;const s=[];let o=i.shift(),r=sd.test(o);for(;;){if(r){const t=parseFloat(o);isNaN(t)?s.push(o):s.push(Math.ceil(t*e*n)/n)}else s.push(o);if(o=i.shift(),void 0===o)return s.join("");r=!r}}function rd(t){let e="";switch(t.hAlign){case"left":e+="xMin";break;case"right":e+="xMax";break;default:e+="xMid"}switch(t.vAlign){case"top":e+="YMin";break;case"bottom":e+="YMax";break;default:e+="YMid"}return e+=t.slice?" slice":" meet",e}const ad=/\sid="(\S+)"/g,ld="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let cd=0;function hd(t,e=ld){const n=[];let i;for(;i=ad.exec(t);)n.push(i[1]);return n.length?(n.forEach((n=>{const i="function"==typeof e?e(n):e+(cd++).toString(),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")})),t):t}const ud=Object.create(null);function dd(t){return ud[t]||ud[""]}function fd(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:void 0===t.path?"/":t.path,maxURL:t.maxURL?t.maxURL:500,rotate:t.rotate?t.rotate:750,timeout:t.timeout?t.timeout:5e3,random:!0===t.random,index:t.index?t.index:0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const pd=Object.create(null),gd=["https://api.simplesvg.com","https://api.unisvg.com"],md=[];for(;gd.length>0;)1===gd.length||Math.random()>.5?md.push(gd.shift()):md.push(gd.pop());function bd(t,e){const n=fd(e);return null!==n&&(pd[t]=n,!0)}function xd(t){return pd[t]}pd[""]=fd({resources:["https://api.iconify.design"].concat(md)});const yd=(t,e)=>{let n=t,i=-1!==n.indexOf("?");return Object.keys(e).forEach((t=>{let s;try{s=function(t){switch(typeof t){case"boolean":return t?"true":"false";case"number":case"string":return encodeURIComponent(t);default:throw new Error("Invalid parameter")}}(e[t])}catch(t){return}n+=(i?"&":"?")+encodeURIComponent(t)+"="+s,i=!0})),n},_d={},vd={};let $d=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}return null})();const kd={prepare:(t,e,n)=>{const i=[];let s=_d[e];void 0===s&&(s=function(t,e){const n=xd(t);if(!n)return 0;let i;if(n.maxURL){let t=0;n.resources.forEach((e=>{const n=e;t=Math.max(t,n.length)}));const s=yd(e+".json",{icons:""});i=n.maxURL-t-n.path.length-s.length}else i=0;const s=t+":"+e;return vd[t]=n.path,_d[s]=i,i}(t,e));const o="icons";let r={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach(((n,l)=>{a+=n.length+1,a>=s&&l>0&&(i.push(r),r={type:o,provider:t,prefix:e,icons:[]},a=n.length),r.icons.push(n)})),i.push(r),i},send:(t,e,n)=>{if(!$d)return void n("abort",424);let i=function(t){if("string"==typeof t){if(void 0===vd[t]){const e=xd(t);if(!e)return"/";vd[t]=e.path}return vd[t]}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");i+=yd(t+".json",{icons:n});break}case"custom":{const t=e.uri;i+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let s=503;$d(t+i).then((t=>{const e=t.status;if(200===e)return s=501,t.json();setTimeout((()=>{n(function(t){return 404===t}(e)?"abort":"next",e)}))})).then((t=>{"object"==typeof t&&null!==t?setTimeout((()=>{n("success",t)})):setTimeout((()=>{n("next",s)}))})).catch((()=>{n("next",s)}))}};const wd=Object.create(null),Cd=Object.create(null);function Md(t,e){t.forEach((t=>{const n=t.provider;if(void 0===wd[n])return;const i=wd[n],s=t.prefix,o=i[s];o&&(i[s]=o.filter((t=>t.id!==e)))}))}let Sd=0;var Ld={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Dd(t,e,n,i){const s=t.resources.length,o=t.random?Math.floor(Math.random()*s):t.index;let r;if(t.random){let e=t.resources.slice(0);for(r=[];e.length>1;){const t=Math.floor(Math.random()*e.length);r.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}r=r.concat(e)}else r=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l,c="pending",h=0,u=null,d=[],f=[];function p(){u&&(clearTimeout(u),u=null)}function g(){"pending"===c&&(c="aborted"),p(),d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function m(t,e){e&&(f=[]),"function"==typeof t&&f.push(t)}function b(){c="failed",f.forEach((t=>{t(void 0,l)}))}function x(){d.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),d=[]}function y(){if("pending"!==c)return;p();const i=r.shift();if(void 0===i)return d.length?void(u=setTimeout((()=>{p(),"pending"===c&&(x(),b())}),t.timeout)):void b();const s={status:"pending",resource:i,callback:(e,n)=>{!function(e,n,i){const s="success"!==n;switch(d=d.filter((t=>t!==e)),c){case"pending":break;case"failed":if(s||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=i,void b();if(s)return l=i,void(d.length||(r.length?y():b()));if(p(),x(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}c="completed",f.forEach((t=>{t(i)}))}(s,e,n)}};d.push(s),h++,u=setTimeout(y,t.rotate),n(i,e,s.callback)}return"function"==typeof i&&f.push(i),setTimeout(y),function(){return{startTime:a,payload:e,status:c,queriesSent:h,queriesPending:d.length,subscribe:m,abort:g}}}function Pd(t){const e=function(t){if(!("object"==typeof t&&"object"==typeof t.resources&&t.resources instanceof Array&&t.resources.length))throw new Error("Invalid Reduncancy configuration");const e=Object.create(null);let n;for(n in Ld)void 0!==t[n]?e[n]=t[n]:e[n]=Ld[n];return e}(t);let n=[];function i(){n=n.filter((t=>"pending"===t().status))}const s={query:function(t,s,o){const r=Dd(e,t,s,((t,e)=>{i(),o&&o(t,e)}));return n.push(r),r},find:function(t){const e=n.find((e=>t(e)));return void 0!==e?e:null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:i};return s}function Od(){}const Ad=Object.create(null);function Ed(t,e,n){let i,s;if("string"==typeof t){const e=dd(t);if(!e)return n(void 0,424),Od;s=e.send;const o=function(t){if(void 0===Ad[t]){const e=xd(t);if(!e)return;const n={config:e,redundancy:Pd(e)};Ad[t]=n}return Ad[t]}(t);o&&(i=o.redundancy)}else{const e=fd(t);if(e){i=Pd(e);const n=dd(t.resources?t.resources[0]:"");n&&(s=n.send)}}return i&&s?i.query(e,s,n)().abort:(n(void 0,424),Od)}const Td={};function Rd(){}const zd=Object.create(null),Id=Object.create(null),Fd=Object.create(null),Nd=Object.create(null);function jd(t,e){void 0===Fd[t]&&(Fd[t]=Object.create(null));const n=Fd[t];n[e]||(n[e]=!0,setTimeout((()=>{n[e]=!1,function(t,e){void 0===Cd[t]&&(Cd[t]=Object.create(null));const n=Cd[t];n[e]||(n[e]=!0,setTimeout((()=>{if(n[e]=!1,void 0===wd[t]||void 0===wd[t][e])return;const i=wd[t][e].slice(0);if(!i.length)return;const s=Ku(t,e);let o=!1;i.forEach((n=>{const i=n.icons,r=i.pending.length;i.pending=i.pending.filter((n=>{if(n.prefix!==e)return!0;const r=n.name;if(void 0!==s.icons[r])i.loaded.push({provider:t,prefix:e,name:r});else{if(void 0===s.missing[r])return o=!0,!0;i.missing.push({provider:t,prefix:e,name:r})}return!1})),i.pending.length!==r&&(o||Md([{provider:t,prefix:e}],n.id),n.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),n.abort))}))})))}(t,e)})))}const Bd=Object.create(null);function Vd(t,e,n){void 0===Id[t]&&(Id[t]=Object.create(null));const i=Id[t];void 0===Nd[t]&&(Nd[t]=Object.create(null));const s=Nd[t];void 0===zd[t]&&(zd[t]=Object.create(null));const o=zd[t];void 0===i[e]?i[e]=n:i[e]=i[e].concat(n).sort(),s[e]||(s[e]=!0,setTimeout((()=>{s[e]=!1;const n=i[e];delete i[e];const r=dd(t);if(!r)return void function(){const n=(""===t?"":"@"+t+":")+e,i=Math.floor(Date.now()/6e4);Bd[n]<i&&(Bd[n]=i,console.error('Unable to retrieve icons for "'+n+'" because API is not configured properly.'))}();r.prepare(t,e,n).forEach((n=>{Ed(t,n,((i,s)=>{const r=Ku(t,e);if("object"!=typeof i){if(404!==s)return;const t=Date.now();n.icons.forEach((e=>{r.missing[e]=t}))}else try{const n=Ju(r,i);if(!n.length)return;const s=o[e];n.forEach((t=>{delete s[t]})),Td.store&&Td.store(t,i)}catch(t){console.error(t)}jd(t,e)}))}))})))}const Hd=(t,e)=>{const n=function(t,e=!0,n=!1){const i=[];return t.forEach((t=>{const s="string"==typeof t?Wu(t,!1,n):t;e&&!Uu(s,n)||i.push({provider:s.provider,prefix:s.prefix,name:s.name})})),i}(t,!0,td()),i=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort(((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name)));let i={provider:"",prefix:"",name:""};return t.forEach((t=>{if(i.name===t.name&&i.prefix===t.prefix&&i.provider===t.provider)return;i=t;const s=t.provider,o=t.prefix,r=t.name;void 0===n[s]&&(n[s]=Object.create(null));const a=n[s];void 0===a[o]&&(a[o]=Ku(s,o));const l=a[o];let c;c=void 0!==l.icons[r]?e.loaded:""===o||void 0!==l.missing[r]?e.missing:e.pending;const h={provider:s,prefix:o,name:r};c.push(h)})),e}(n);if(!i.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(i.loaded,i.missing,i.pending,Rd)})),()=>{t=!1}}const s=Object.create(null),o=[];let r,a;i.pending.forEach((t=>{const e=t.provider,n=t.prefix;if(n===a&&e===r)return;r=e,a=n,o.push({provider:e,prefix:n}),void 0===zd[e]&&(zd[e]=Object.create(null));const i=zd[e];void 0===i[n]&&(i[n]=Object.create(null)),void 0===s[e]&&(s[e]=Object.create(null));const l=s[e];void 0===l[n]&&(l[n]=[])}));const l=Date.now();return i.pending.forEach((t=>{const e=t.provider,n=t.prefix,i=t.name,o=zd[e][n];void 0===o[i]&&(o[i]=l,s[e][n].push(i))})),o.forEach((t=>{const e=t.provider,n=t.prefix;s[e][n].length&&Vd(e,n,s[e][n])})),e?function(t,e,n){const i=Sd++,s=Md.bind(null,n,i);if(!e.pending.length)return s;const o={id:i,icons:e,callback:t,abort:s};return n.forEach((t=>{const e=t.provider,n=t.prefix;void 0===wd[e]&&(wd[e]=Object.create(null));const i=wd[e];void 0===i[n]&&(i[n]=[]),i[n].push(o)})),s}(e,i,o):Rd},Wd="iconify2",Ud="iconify",qd=Ud+"-count",Yd=Ud+"-version",Zd=36e5,Xd={local:!0,session:!0};let Gd=!1;const Kd={local:0,session:0},Jd={local:[],session:[]};let Qd="undefined"==typeof window?{}:window;function tf(t){const e=t+"Storage";try{if(Qd&&Qd[e]&&"number"==typeof Qd[e].length)return Qd[e]}catch(t){}return Xd[t]=!1,null}function ef(t,e,n){try{return t.setItem(qd,n.toString()),Kd[e]=n,!0}catch(t){return!1}}function nf(t){const e=t.getItem(qd);if(e){const t=parseInt(e);return t||0}return 0}const sf=()=>{if(Gd)return;Gd=!0;const t=Math.floor(Date.now()/Zd)-168;function e(e){const n=tf(e);if(!n)return;const i=e=>{const i=Ud+e.toString(),s=n.getItem(i);if("string"!=typeof s)return!1;let o=!0;try{const e=JSON.parse(s);if("object"!=typeof e||"number"!=typeof e.cached||e.cached<t||"string"!=typeof e.provider||"object"!=typeof e.data||"string"!=typeof e.data.prefix)o=!1;else{const t=e.provider,n=e.data.prefix;o=Ju(Ku(t,n),e.data).length>0}}catch(t){o=!1}return o||n.removeItem(i),o};try{const t=n.getItem(Yd);if(t!==Wd)return t&&function(t){try{const e=nf(t);for(let n=0;n<e;n++)t.removeItem(Ud+n.toString())}catch(t){}}(n),void function(t,e){try{t.setItem(Yd,Wd)}catch(t){}ef(t,e,0)}(n,e);let s=nf(n);for(let t=s-1;t>=0;t--)i(t)||(t===s-1?s--:Jd[e].push(t));ef(n,e,s)}catch(t){}}for(const t in Xd)e(t)},of=(t,e)=>{function n(n){if(!Xd[n])return!1;const i=tf(n);if(!i)return!1;let s=Jd[n].shift();if(void 0===s&&(s=Kd[n],!ef(i,n,s+1)))return!1;try{const n={cached:Math.floor(Date.now()/Zd),provider:t,data:e};i.setItem(Ud+s.toString(),JSON.stringify(n))}catch(t){return!1}return!0}Gd||sf(),Object.keys(e.icons).length&&(e.not_found&&delete(e=Object.assign({},e)).not_found,n("local")||n("session"))},rf=/[\s,]+/;function af(t,e){e.split(rf).forEach((e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}}))}function lf(t,e){e.split(rf).forEach((e=>{const n=e.trim();switch(n){case"left":case"center":case"right":t.hAlign=n;break;case"top":case"middle":case"bottom":t.vAlign=n;break;case"slice":case"crop":t.slice=!0;break;case"meet":t.slice=!1}}))}function cf(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:i(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s/=e,s%1==0?i(s):0)}}return e}const hf={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"};function uf(t,e){const n=function(t,e){const n={};for(const i in t){const s=i;if(n[s]=t[s],void 0===e[s])continue;const o=e[s];switch(s){case"inline":case"slice":"boolean"==typeof o&&(n[s]=o);break;case"hFlip":case"vFlip":!0===o&&(n[s]=!n[s]);break;case"hAlign":case"vAlign":"string"==typeof o&&""!==o&&(n[s]=o);break;case"width":case"height":("string"==typeof o&&""!==o||"number"==typeof o&&o||null===o)&&(n[s]=o);break;case"rotate":"number"==typeof o&&(n[s]+=o)}}return n}(nd,e),i={...hf};let s="string"==typeof e.style?e.style:"";for(let t in e){const o=e[t];if(void 0!==o)switch(t){case"icon":case"style":case"onLoad":break;case"inline":case"hFlip":case"vFlip":n[t]=!0===o||"true"===o||1===o;break;case"flip":"string"==typeof o&&af(n,o);break;case"align":"string"==typeof o&&lf(n,o);break;case"color":s=s+(s.length>0&&";"!==s.trim().slice(-1)?";":"")+"color: "+o+"; ";break;case"rotate":"string"==typeof o?n[t]=cf(o):"number"==typeof o&&(n[t]=o);break;case"ariaHidden":case"aria-hidden":!0!==o&&"true"!==o&&delete i["aria-hidden"];break;default:if("on:"===t.slice(0,3))break;void 0===nd[t]&&(i[t]=o)}}const o=function(t,e){const n={left:t.left,top:t.top,width:t.width,height:t.height};let i,s,o=t.body;[t,e].forEach((t=>{const e=[],i=t.hFlip,s=t.vFlip;let r,a=t.rotate;switch(i?s?a+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):s&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:r=n.height/2+n.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:r=n.width/2+n.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}a%2==1&&(0===n.left&&0===n.top||(r=n.left,n.left=n.top,n.top=r),n.width!==n.height&&(r=n.width,n.width=n.height,n.height=r)),e.length&&(o='<g transform="'+e.join(" ")+'">'+o+"</g>")})),null===e.width&&null===e.height?(s="1em",i=od(s,n.width/n.height)):null!==e.width&&null!==e.height?(i=e.width,s=e.height):null!==e.height?(s=e.height,i=od(s,n.width/n.height)):(i=e.width,s=od(i,n.height/n.width)),"auto"===i&&(i=n.width),"auto"===s&&(s=n.height),i="string"==typeof i?i:i.toString()+"",s="string"==typeof s?s:s.toString()+"";const r={attributes:{width:i,height:s,preserveAspectRatio:rd(e),viewBox:n.left.toString()+" "+n.top.toString()+" "+n.width.toString()+" "+n.height.toString()},body:o};return e.inline&&(r.inline=!0),r}(t,n);for(let t in o.attributes)i[t]=o.attributes[t];o.inline&&(s="vertical-align: -0.125em; "+s),""!==s&&(i.style=s);let r=0,a=e.id;return"string"==typeof a&&(a=a.replace(/-/g,"_")),{attributes:i,body:hd(o.body,a?()=>a+"ID"+r++:"iconifySvelte")}}var df;if(td(!0),df=kd,ud[""]=df,"undefined"!=typeof document&&"undefined"!=typeof window){Td.store=of,sf();const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach((t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e="string"==typeof t.provider?t.provider:""),Qu&&""===e&&("string"!=typeof t.prefix||""===t.prefix)){let e=!1;return Xu(t)&&(t.prefix="",Yu(t,((t,n)=>{n&&ed(t,n)&&(e=!0)}))),e}return!("string"!=typeof t.prefix||!Uu({provider:e,prefix:t.prefix,name:"a"}))&&!!Ju(Ku(e,t.prefix),t)}(t))&&console.error(n)}catch(t){console.error(n)}}))}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const n="IconifyProviders["+t+"] is invalid.";try{const i=e[t];if("object"!=typeof i||!i||void 0===i.resources)continue;bd(t,i)||console.error(n)}catch(t){console.error(n)}}}}function ff(t,e,n,i,s){function o(){e.loading&&(e.loading.abort(),e.loading=null)}if("object"==typeof t&&null!==t&&"string"==typeof t.body)return e.name="",o(),{data:Hu(t)};let r;if("string"!=typeof t||null===(r=Wu(t,!1,!0)))return o(),null;const a=function(t){const e="string"==typeof t?Wu(t,!0,Qu):t;return e?function(t,e){const n=t.icons[e];return void 0===n?null:n}(Ku(e.provider,e.prefix),e.name):null}(r);if(null===a)return!n||e.loading&&e.loading.name===t||(o(),e.name="",e.loading={name:t,abort:Hd([r],i)}),null;o(),e.name!==t&&(e.name=t,s&&!e.destroyed&&s(t));const l=["iconify"];return""!==r.prefix&&l.push("iconify--"+r.prefix),""!==r.provider&&l.push("iconify--"+r.provider),{data:a,classes:l}}function pf(t){let n,i=t[0].body+"",s=[t[0].attributes],o={};for(let t=0;t<s.length;t+=1)o=e(o,s[t]);return{c(){n=k("svg"),D(n,o)},m(t,e){y(t,n,e),n.innerHTML=i},p(t,e){1&e&&i!==(i=t[0].body+"")&&(n.innerHTML=i),D(n,o=rt(s,[1&e&&t[0].attributes]))},d(t){t&&_(n)}}}function gf(e){let n,i=null!==e[0]&&pf(e);return{c(){i&&i.c(),n=M()},m(t,e){i&&i.m(t,e),y(t,n,e)},p(t,[e]){null!==t[0]?i?i.p(t,e):(i=pf(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:t,o:t,d(t){i&&i.d(t),t&&_(n)}}}function mf(t,n,i){const s={name:"",loading:null,destroyed:!1};let o,r=!1,a=0;const l=t=>{"function"==typeof n.onLoad&&n.onLoad(t);N()("load",{icon:t})};function c(){i(3,a++,a)}var h;return F((()=>{i(2,r=!0)})),h=()=>{i(1,s.destroyed=!0,s),s.loading&&(s.loading.abort(),i(1,s.loading=null,s))},I().$$.on_destroy.push(h),t.$$set=t=>{i(6,n=e(e({},n),g(t)))},t.$$.update=()=>{{const a=ff(n.icon,s,r,c,l);i(0,o=a?(t=a.data,e=n,t?uf(t,e):null):null),o&&a.classes&&i(0,o.attributes.class=("string"==typeof n.class?n.class+" ":"")+a.classes.join(" "),o)}var t,e},n=g(n),[o,s,r,a]}class bf extends pt{constructor(t){super(),ft(this,t,mf,gf,r,{})}}function xf(t){let e,n,i,o,r,a,l,c,h;return i=new bf({props:{icon:"mdi:close"}}),a=new Iu({props:{componentData:t[1]}}),{c(){e=$("div"),n=$("span"),ct(i.$$.fragment),o=C(),r=$("div"),ct(a.$$.fragment),L(n,"class","cancelButton svelte-1hhf5ym"),L(r,"class","modalContainer"),L(e,"class","modal svelte-1hhf5ym"),L(e,"data-component","modal")},m(s,u){y(s,e,u),x(e,n),ht(i,n,null),x(e,o),x(e,r),ht(a,r,null),l=!0,c||(h=[S(r,"click",_f),S(e,"click",t[3])],c=!0)},p(t,e){const n={};2&e&&(n.componentData=t[1]),a.$set(n)},i(t){l||(st(i.$$.fragment,t),st(a.$$.fragment,t),l=!0)},o(t){ot(i.$$.fragment,t),ot(a.$$.fragment,t),l=!1},d(t){t&&_(e),ut(i),ut(a),c=!1,s(h)}}}function yf(t){let e,n,i,s,o=t[0]&&t[1]&&xf(t);return{c(){o&&o.c(),e=M()},m(r,a){o&&o.m(r,a),y(r,e,a),n=!0,i||(s=S(window,"keyup",t[2]),i=!0)},p(t,[n]){t[0]&&t[1]?o?(o.p(t,n),3&n&&st(o,1)):(o=xf(t),o.c(),st(o,1),o.m(e.parentNode,e)):o&&(nt(),ot(o,1,1,(()=>{o=null})),it())},i(t){n||(st(o),n=!0)},o(t){ot(o),n=!1},d(t){o&&o.d(t),t&&_(e),i=!1,s()}}}const _f=t=>{t?.stopImmediatePropagation()};function vf(t,e,n){let i;c(t,$t,(t=>n(1,i=t)));let{componentData:s}=e;return t.$$set=t=>{"componentData"in t&&n(0,s=t.componentData)},[s,i,function(t){"Escape"===t.code&&$t.set(void 0)},function(t){t.stopImmediatePropagation(),$t.set(void 0)}]}class $f extends pt{constructor(t){super(),ft(this,t,vf,yf,r,{componentData:0})}}function kf(t,e,n){const i=t.slice();return i[2]=e[n][0],i[3]=e[n][1],i}function wf(t,e,n){const i=t.slice();return i[6]=e[n],i}function Cf(t){let e,n,i=t[2]+"";return{c(){e=$("span"),n=w(i),L(e,"class","pageId svelte-1kdpgko")},m(t,i){y(t,e,i),x(e,n)},p(t,e){1&e&&i!==(i=t[2]+"")&&P(n,i)},d(t){t&&_(e)}}}function Mf(t){let e,n,i,s,o,r,a=t[6]+"";function l(){return t[1](t[6])}return{c(){e=$("li"),n=$("button"),i=w(a),s=C(),L(n,"class","textButton"),L(e,"class","sectionLink svelte-1kdpgko")},m(t,a){y(t,e,a),x(e,n),x(n,i),x(e,s),o||(r=S(n,"click",l),o=!0)},p(e,n){t=e,1&n&&a!==(a=t[6]+"")&&P(i,a)},d(t){t&&_(e),o=!1,r()}}}function Sf(t){let e,n,i,s,o=t[2]&&Cf(t),r=t[3]||[],a=[];for(let e=0;e<r.length;e+=1)a[e]=Mf(wf(t,r,e));return{c(){e=$("li"),o&&o.c(),n=C(),i=$("ul");for(let t=0;t<a.length;t+=1)a[t].c();s=C(),L(i,"class","navItem svelte-1kdpgko"),L(e,"class","svelte-1kdpgko")},m(t,r){y(t,e,r),o&&o.m(e,null),x(e,n),x(e,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(i,null);x(e,s)},p(t,s){if(t[2]?o?o.p(t,s):(o=Cf(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),1&s){let e;for(r=t[3]||[],e=0;e<r.length;e+=1){const n=wf(t,r,e);a[e]?a[e].p(n,s):(a[e]=Mf(n),a[e].c(),a[e].m(i,null))}for(;e<a.length;e+=1)a[e].d(1);a.length=r.length}},d(t){t&&_(e),o&&o.d(),v(a,t)}}}function Lf(e){let n,i,s=Object.entries(e[0]),o=[];for(let t=0;t<s.length;t+=1)o[t]=Sf(kf(e,s,t));return{c(){n=$("nav"),i=$("ul");for(let t=0;t<o.length;t+=1)o[t].c();L(i,"class","navList svelte-1kdpgko"),L(n,"class","nav svelte-1kdpgko")},m(t,e){y(t,n,e),x(n,i);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(i,null)},p(t,[e]){if(1&e){let n;for(s=Object.entries(t[0]),n=0;n<s.length;n+=1){const r=kf(t,s,n);o[n]?o[n].p(r,e):(o[n]=Sf(r),o[n].c(),o[n].m(i,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=s.length}},i:t,o:t,d(t){t&&_(n),v(o,t)}}}function Df(t,e,n){let{pageHierarchy:i={}}=e;return t.$$set=t=>{"pageHierarchy"in t&&n(0,i=t.pageHierarchy)},[i,t=>function(t){const e=document.querySelector(`[data-section-id="${t}"]`);null==e||e.scrollIntoView({behavior:"smooth"})}(t)]}class Pf extends pt{constructor(t){super(),ft(this,t,Df,Lf,r,{pageHierarchy:0})}}const{Boolean:Of}=b;function Af(t,e,n){const i=t.slice();return i[5]=e[n],i}function Ef(t){let e,n;return e=new Pf({props:{pageHierarchy:kt(t[0]?.components)}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.pageHierarchy=kt(t[0]?.components)),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Tf(t){let e,n;return e=new Iu({props:{componentData:t[5]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.componentData=t[5]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Rf(t){let e,n,i=t[0]?.components||[],s=[];for(let e=0;e<i.length;e+=1)s[e]=Tf(Af(t,i,e));const o=t=>ot(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=M()},m(t,i){for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0]?.components||[],r=0;r<i.length;r+=1){const o=Af(t,i,r);s[r]?(s[r].p(o,n),st(s[r],1)):(s[r]=Tf(o),s[r].c(),st(s[r],1),s[r].m(e.parentNode,e))}for(nt(),r=i.length;r<s.length;r+=1)o(r);it()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)st(s[t]);n=!0}},o(t){s=s.filter(Of);for(let t=0;t<s.length;t+=1)ot(s[t]);n=!1},d(t){v(s,t),t&&_(e)}}}function zf(t){let e,n;return e=new $f({props:{componentData:t[1]}}),{c(){ct(e.$$.fragment)},m(t,i){ht(e,t,i),n=!0},p(t,n){const i={};2&n&&(i.componentData=t[1]),e.$set(i)},i(t){n||(st(e.$$.fragment,t),n=!0)},o(t){ot(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function If(t){let e,n,i,s,o,r,a;n=new Tt({props:{$$slots:{default:[Ef]},$$scope:{ctx:t}}}),s=new ju({props:{$$slots:{default:[Rf]},$$scope:{ctx:t}}});let l=t[1]&&zf(t);return{c(){e=$("div"),ct(n.$$.fragment),i=C(),ct(s.$$.fragment),o=C(),l&&l.c(),r=M(),L(e,"class","container mf-card svelte-teyund"),A(e,"embed",t[2])},m(t,c){y(t,e,c),ht(n,e,null),x(e,i),ht(s,e,null),y(t,o,c),l&&l.m(t,c),y(t,r,c),a=!0},p(t,[e]){const i={};257&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i);const o={};257&e&&(o.$$scope={dirty:e,ctx:t}),s.$set(o),t[1]?l?(l.p(t,e),2&e&&st(l,1)):(l=zf(t),l.c(),st(l,1),l.m(r.parentNode,r)):l&&(nt(),ot(l,1,1,(()=>{l=null})),it())},i(t){a||(st(n.$$.fragment,t),st(s.$$.fragment,t),st(l),a=!0)},o(t){ot(n.$$.fragment,t),ot(s.$$.fragment,t),ot(l),a=!1},d(t){t&&_(e),ut(n),ut(s),t&&_(o),l&&l.d(t),t&&_(r)}}}function Ff(t,e,n){let i,s;c(t,_t,(t=>n(0,i=t))),c(t,$t,(t=>n(1,s=t)));let{cardDataId:o}=e;vt(o);const r=new URLSearchParams(null===window||void 0===window?void 0:window.location.search);let a=Boolean(r.get("embed"));return t.$$set=t=>{"cardDataId"in t&&n(3,o=t.cardDataId)},[i,s,a,o]}class Nf extends pt{constructor(t){super(),ft(this,t,Ff,If,r,{cardDataId:3})}}var jf;let Bf;try{const t=window.mfCardDataId,e=window.mfContainerId,n=null===(jf=document.querySelector(`[data-container="${e}"]`))||void 0===jf?void 0:jf.querySelector(".card_app");Bf=new Nf({target:null!=n?n:document.querySelector(".card_app"),props:{cardDataId:t}})}catch(t){throw new Error(t)}return Bf}();
|
|
21
|
-
|
|
1
|
+
(function(re,Ge){typeof exports=="object"&&typeof module<"u"?module.exports=Ge():typeof define=="function"&&define.amd?define(Ge):(re=typeof globalThis<"u"?globalThis:re||self,re["Outerbounds Cards"]=Ge())})(this,function(){"use strict";var Z3e=Object.defineProperty;var K3e=(re,Ge,Gn)=>Ge in re?Z3e(re,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):re[Ge]=Gn;var Tt=(re,Ge,Gn)=>(K3e(re,typeof Ge!="symbol"?Ge+"":Ge,Gn),Gn),J3e=(re,Ge,Gn)=>{if(!Ge.has(re))throw TypeError("Cannot "+Gn)};var w5=(re,Ge,Gn)=>{if(Ge.has(re))throw TypeError("Cannot add the same private member more than once");Ge instanceof WeakSet?Ge.add(re):Ge.set(re,Gn)};var zm=(re,Ge,Gn)=>(J3e(re,Ge,"access private method"),Gn);var bh,k5,Im,lz,sz,oz;function re(){}function Ge(e,t){for(const n in t)e[n]=t[n];return e}function Gn(e){return e()}function $5(){return Object.create(null)}function Ll(e){e.forEach(Gn)}function E5(e){return typeof e=="function"}function he(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let vh;function xh(e,t){return e===t?!0:(vh||(vh=document.createElement("a")),vh.href=t,e===vh.href)}function uz(e){return Object.keys(e).length===0}function cz(e,...t){if(e==null){for(const i of t)i(void 0);return re}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function _h(e,t,n){e.$$.on_destroy.push(cz(t,n))}function ct(e,t,n,i){if(e){const r=C5(e,t,n,i);return e[0](r)}}function C5(e,t,n,i){return e[1]&&i?Ge(n.ctx.slice(),e[1](i(t))):n.ctx}function ft(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function dt(e,t,n,i,r,s){if(r){const o=C5(t,n,i,s);e.p(o,r)}}function ht(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function Pm(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function S5(e,t){const n={};t=new Set(t);for(const i in e)!t.has(i)&&i[0]!=="$"&&(n[i]=e[i]);return n}const fz=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function X(e,t){e.appendChild(t)}function z(e,t,n){e.insertBefore(t,n||null)}function L(e){e.parentNode&&e.parentNode.removeChild(e)}function Rt(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function H(e){return document.createElement(e)}function Si(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Be(e){return document.createTextNode(e)}function je(){return Be(" ")}function Ae(){return Be("")}function Il(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function D(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const dz=["width","height"];function A5(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const i in t)t[i]==null?e.removeAttribute(i):i==="style"?e.style.cssText=t[i]:i==="__value"?e.value=e[i]=t[i]:n[i]&&n[i].set&&dz.indexOf(i)===-1?e[i]=t[i]:D(e,i,t[i])}function T5(e,t){for(const n in t)D(e,n,t[n])}function hz(e){return Array.from(e.childNodes)}function pt(e,t){t=""+t,e.data!==t&&(e.data=t)}function ci(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function Vn(e,t,n){e.classList.toggle(t,!!n)}function pz(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}class gz{constructor(t=!1){Tt(this,"is_svg",!1);Tt(this,"e");Tt(this,"n");Tt(this,"t");Tt(this,"a");this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=Si(n.nodeName):this.e=H(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)z(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(L)}}function Ye(e,t){return new e(t)}let Sc;function Ac(e){Sc=e}function Tc(){if(!Sc)throw new Error("Function called outside component initialization");return Sc}function Mc(e){Tc().$$.on_mount.push(e)}function M5(e){Tc().$$.on_destroy.push(e)}function Bm(){const e=Tc();return(t,n,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=pz(t,n,{cancelable:i});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function F5(e,t){return Tc().$$.context.set(e,t),t}function D5(e){return Tc().$$.context.get(e)}function N5(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const zl=[],Xi=[];let Pl=[];const jm=[],mz=Promise.resolve();let Um=!1;function yz(){Um||(Um=!0,mz.then(O5))}function qm(e){Pl.push(e)}function Wm(e){jm.push(e)}const Hm=new Set;let Bl=0;function O5(){if(Bl!==0)return;const e=Sc;do{try{for(;Bl<zl.length;){const t=zl[Bl];Bl++,Ac(t),bz(t.$$)}}catch(t){throw zl.length=0,Bl=0,t}for(Ac(null),zl.length=0,Bl=0;Xi.length;)Xi.pop()();for(let t=0;t<Pl.length;t+=1){const n=Pl[t];Hm.has(n)||(Hm.add(n),n())}Pl.length=0}while(zl.length);for(;jm.length;)jm.pop()();Um=!1,Hm.clear(),Ac(e)}function bz(e){if(e.fragment!==null){e.update(),Ll(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(qm)}}function vz(e){const t=[],n=[];Pl.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),Pl=t}const wh=new Set;let ua;function $e(){ua={r:0,c:[],p:ua}}function Ee(){ua.r||Ll(ua.c),ua=ua.p}function F(e,t){e&&e.i&&(wh.delete(e),e.i(t))}function N(e,t,n,i){if(e&&e.o){if(wh.has(e))return;wh.add(e),ua.c.push(()=>{wh.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Oe(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function fi(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[s];if(a){for(const l in o)l in a||(i[l]=1);for(const l in a)r[l]||(n[l]=a[l],r[l]=1);e[s]=a}else for(const l in o)r[l]=1}for(const o in i)o in n||(n[o]=void 0);return n}function Yi(e){return typeof e=="object"&&e!==null?e:{}}function Gm(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function ce(e){e&&e.c()}function le(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),qm(()=>{const s=e.$$.on_mount.map(Gn).filter(E5);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ll(s),e.$$.on_mount=[]}),r.forEach(qm)}function ue(e,t){const n=e.$$;n.fragment!==null&&(vz(n.after_update),Ll(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function xz(e,t){e.$$.dirty[0]===-1&&(zl.push(e),yz(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function be(e,t,n,i,r,s,o=null,a=[-1]){const l=Sc;Ac(e);const u=e.$$={fragment:null,ctx:[],props:s,update:re,not_equal:r,bound:$5(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:$5(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};o&&o(u.root);let c=!1;if(u.ctx=n?n(e,t.props||{},(f,d,...h)=>{const p=h.length?h[0]:d;return u.ctx&&r(u.ctx[f],u.ctx[f]=p)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](p),c&&xz(e,f)),d}):[],u.update(),c=!0,Ll(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const f=hz(t.target);u.fragment&&u.fragment.l(f),f.forEach(L)}else u.fragment&&u.fragment.c();t.intro&&F(e.$$.fragment),le(e,t.target,t.anchor),O5()}Ac(l)}class ve{constructor(){Tt(this,"$$");Tt(this,"$$set")}$destroy(){ue(this,1),this.$destroy=re}$on(t,n){if(!E5(n))return re;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!uz(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const _z="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_z);var wz=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{},Fr=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,i={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function h(p){return p instanceof s?new s(p.type,h(p.content),p.alias):Array.isArray(p)?p.map(h):p.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(h){return Object.prototype.toString.call(h).slice(8,-1)},objId:function(h){return h.__id||Object.defineProperty(h,"__id",{value:++n}),h.__id},clone:function h(p,g){var m,y;switch(g=g||{},r.util.type(p)){case"Object":if(y=r.util.objId(p),g[y])return g[y];for(var b in m={},g[y]=m,p)p.hasOwnProperty(b)&&(m[b]=h(p[b],g));return m;case"Array":return y=r.util.objId(p),g[y]?g[y]:(m=[],g[y]=m,p.forEach(function(v,x){m[x]=h(v,g)}),m);default:return p}},getLanguage:function(h){for(;h;){var p=t.exec(h.className);if(p)return p[1].toLowerCase();h=h.parentElement}return"none"},setLanguage:function(h,p){h.className=h.className.replace(RegExp(t,"gi"),""),h.classList.add("language-"+p)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(m){var h=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(m.stack)||[])[1];if(h){var p=document.getElementsByTagName("script");for(var g in p)if(p[g].src==h)return p[g]}return null}},isActive:function(h,p,g){for(var m="no-"+p;h;){var y=h.classList;if(y.contains(p))return!0;if(y.contains(m))return!1;h=h.parentElement}return!!g}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(h,p){var g=r.util.clone(r.languages[h]);for(var m in p)g[m]=p[m];return g},insertBefore:function(h,p,g,m){var y=(m=m||r.languages)[h],b={};for(var v in y)if(y.hasOwnProperty(v)){if(v==p)for(var x in g)g.hasOwnProperty(x)&&(b[x]=g[x]);g.hasOwnProperty(v)||(b[v]=y[v])}var _=m[h];return m[h]=b,r.languages.DFS(r.languages,function(k,w){w===_&&k!=h&&(this[k]=b)}),b},DFS:function h(p,g,m,y){y=y||{};var b=r.util.objId;for(var v in p)if(p.hasOwnProperty(v)){g.call(p,v,p[v],m||v);var x=p[v],_=r.util.type(x);_!=="Object"||y[b(x)]?_!=="Array"||y[b(x)]||(y[b(x)]=!0,h(x,g,v,y)):(y[b(x)]=!0,h(x,g,null,y))}}},plugins:{},highlightAll:function(h,p){r.highlightAllUnder(document,h,p)},highlightAllUnder:function(h,p,g){var m={callback:g,container:h,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",m),m.elements=Array.prototype.slice.apply(m.container.querySelectorAll(m.selector)),r.hooks.run("before-all-elements-highlight",m);for(var y,b=0;y=m.elements[b++];)r.highlightElement(y,p===!0,m.callback)},highlightElement:function(h,p,g){var m=r.util.getLanguage(h),y=r.languages[m];r.util.setLanguage(h,m);var b=h.parentElement;b&&b.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(b,m);var v={element:h,language:m,grammar:y,code:h.textContent};function x(k){v.highlightedCode=k,r.hooks.run("before-insert",v),v.element.innerHTML=v.highlightedCode,r.hooks.run("after-highlight",v),r.hooks.run("complete",v),g&&g.call(v.element)}if(r.hooks.run("before-sanity-check",v),(b=v.element.parentElement)&&b.nodeName.toLowerCase()==="pre"&&!b.hasAttribute("tabindex")&&b.setAttribute("tabindex","0"),!v.code)return r.hooks.run("complete",v),void(g&&g.call(v.element));if(r.hooks.run("before-highlight",v),v.grammar)if(p&&e.Worker){var _=new Worker(r.filename);_.onmessage=function(k){x(k.data)},_.postMessage(JSON.stringify({language:v.language,code:v.code,immediateClose:!0}))}else x(r.highlight(v.code,v.grammar,v.language));else x(r.util.encode(v.code))},highlight:function(h,p,g){var m={code:h,grammar:p,language:g};return r.hooks.run("before-tokenize",m),m.tokens=r.tokenize(m.code,m.grammar),r.hooks.run("after-tokenize",m),s.stringify(r.util.encode(m.tokens),m.language)},tokenize:function(h,p){var g=p.rest;if(g){for(var m in g)p[m]=g[m];delete p.rest}var y=new a;return l(y,y.head,h),function b(v,x,_,k,w,$){for(var S in _)if(_.hasOwnProperty(S)&&_[S]){var E=_[S];E=Array.isArray(E)?E:[E];for(var A=0;A<E.length;++A){if($&&$.cause==S+","+A)return;var R=E[A],C=R.inside,M=!!R.lookbehind,T=!!R.greedy,O=R.alias;if(T&&!R.pattern.global){var P=R.pattern.toString().match(/[imsuy]*$/)[0];R.pattern=RegExp(R.pattern.source,P+"g")}for(var j=R.pattern||R,W=k.next,ne=w;W!==x.tail&&!($&&ne>=$.reach);ne+=W.value.length,W=W.next){var ae=W.value;if(x.length>v.length)return;if(!(ae instanceof s)){var ke,Ie=1;if(T){if(!(ke=o(j,ne,v,M))||ke.index>=v.length)break;var Mr=ke.index,Le=ke.index+ke[0].length,We=ne;for(We+=W.value.length;We<=Mr;)W=W.next,We+=W.value.length;if(We-=W.value.length,ne=We,W.value instanceof s)continue;for(var Wn=W;Wn!==x.tail&&(We<Le||typeof Wn.value=="string");Wn=Wn.next)Ie++,We+=Wn.value.length;Ie--,ae=v.slice(ne,We),ke.index-=ne}else if(!(ke=o(j,0,ae,M)))continue;var Mr=ke.index,Vi=ke[0],se=ae.slice(0,Mr),Te=ae.slice(Mr+Vi.length),De=ne+ae.length;$&&De>$.reach&&($.reach=De);var V=W.prev;se&&(V=l(x,V,se),ne+=se.length),u(x,V,Ie);var qt=new s(S,C?r.tokenize(Vi,C):Vi,O,Vi);if(W=l(x,V,qt),Te&&l(x,W,Te),1<Ie){var He={cause:S+","+A,reach:De};b(v,x,_,W.prev,ne,He),$&&He.reach>$.reach&&($.reach=He.reach)}}}}}}(h,y,p,y.head,0),function(b){for(var v=[],x=b.head.next;x!==b.tail;)v.push(x.value),x=x.next;return v}(y)},hooks:{all:{},add:function(h,p){var g=r.hooks.all;g[h]=g[h]||[],g[h].push(p)},run:function(h,p){var g=r.hooks.all[h];if(g&&g.length)for(var m,y=0;m=g[y++];)m(p)}},Token:s};function s(h,p,g,m){this.type=h,this.content=p,this.alias=g,this.length=0|(m||"").length}function o(h,p,g,m){h.lastIndex=p;var y=h.exec(g);if(y&&m&&y[1]){var b=y[1].length;y.index+=b,y[0]=y[0].slice(b)}return y}function a(){var h={value:null,prev:null,next:null},p={value:null,prev:h,next:null};h.next=p,this.head=h,this.tail=p,this.length=0}function l(h,p,g){var m=p.next,y={value:g,prev:p,next:m};return p.next=y,m.prev=y,h.length++,y}function u(h,p,g){for(var m=p.next,y=0;y<g&&m!==h.tail;y++)m=m.next;(p.next=m).prev=p,h.length-=y}if(e.Prism=r,s.stringify=function h(p,g){if(typeof p=="string")return p;if(Array.isArray(p)){var m="";return p.forEach(function(_){m+=h(_,g)}),m}var y={type:p.type,content:h(p.content,g),tag:"span",classes:["token",p.type],attributes:{},language:g},b=p.alias;b&&(Array.isArray(b)?Array.prototype.push.apply(y.classes,b):y.classes.push(b)),r.hooks.run("wrap",y);var v="";for(var x in y.attributes)v+=" "+x+'="'+(y.attributes[x]||"").replace(/"/g,""")+'"';return"<"+y.tag+' class="'+y.classes.join(" ")+'"'+v+">"+y.content+"</"+y.tag+">"},!e.document)return e.addEventListener&&(r.disableWorkerMessageHandler||e.addEventListener("message",function(h){var p=JSON.parse(h.data),g=p.language,m=p.code,y=p.immediateClose;e.postMessage(r.highlight(m,r.languages[g],g)),y&&e.close()},!1)),r;var c=r.util.currentScript();function f(){r.manual||r.highlightAll()}if(c&&(r.filename=c.src,c.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var d=document.readyState;d==="loading"||d==="interactive"&&c&&c.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return r}(wz);typeof module<"u"&&module.exports&&(module.exports=Fr),typeof global<"u"&&(global.Prism=Fr),Fr.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Fr.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:Fr.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/},Fr.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Fr.languages.python["string-interpolation"].inside.interpolation.inside.rest=Fr.languages.python,Fr.languages.py=Fr.languages.python;const jl=[];function R5(e,t=re){let n;const i=new Set;function r(a){if(he(e,a)&&(e=a,n)){const l=!jl.length;for(const u of i)u[1](),jl.push(u,e);if(l){for(let u=0;u<jl.length;u+=2)jl[u][0](jl[u+1]);jl.length=0}}}function s(a){r(a(e))}function o(a,l=re){const u=[a,l];return i.add(u),i.size===1&&(n=t(r,s)||re),a(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}const Dr=R5(void 0);window.metaflow_card_update=e=>(console.log("metaflow_card_update",e,Dr==null?void 0:Dr.update),Dr==null||Dr.update(t=>{const n={...t};return Object.values(e).forEach(i=>(n==null?void 0:n.components)&&L5(n.components,i)),n}),!0);const kz=(e,t)=>{e.data&&(e.data=JSON.parse(JSON.stringify(t.data))),JSON.stringify(t.spec)===JSON.stringify(e.spec)||(e.spec=JSON.parse(JSON.stringify(t.spec)))},L5=(e,t)=>{const n=e.findIndex(i=>t.id===(i==null?void 0:i.id));n>-1?e[n].type=="vegaChart"?kz(e[n],t):Object.assign(e[n],t):e.forEach(i=>{var r;(i.type==="section"||i.type==="page")&&((r=i==null?void 0:i.contents)!=null&&r.length)&&L5(i.contents,t)})},$z=e=>{try{const t=JSON.parse(atob(window.__MF_DATA__[e]));Dr.set(t)}catch{fetch("/card-example.json").then(n=>n.json()).then(n=>{Dr.set(n)}).catch(console.error)}},Fc=R5(void 0),I5=e=>{const t={};if(!e)return t;function n(i,r=[]){var s;if(i.type==="page"){const o=[];t[i.title]=o,(s=i==null?void 0:i.contents)==null||s.forEach(a=>n(a,o))}i.type==="section"&&i.title&&r.push(i.title)}return e==null||e.forEach(i=>n(i)),t},to=(e,t)=>{const n=t?parseFloat(getComputedStyle(document.documentElement).fontSize.replace("px","")):16;return e/n},Ez=e=>{const t=e.split("/");return{flowname:t[0],runid:t[1],stepname:t==null?void 0:t[2],taskid:t==null?void 0:t[3]}},Cz=(e,t)=>{var n;if(!(!e||!t))return(n=Ez(e))==null?void 0:n[t]},Sz=e=>e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;function Az(e){let t,n,i,r,s,o,a,l;return{c(){t=Si("svg"),n=Si("title"),i=Be("metaflow_logo_horizontal"),r=Si("g"),s=Si("g"),o=Si("g"),a=Si("path"),l=Si("path"),D(a,"d","M223.990273,66.33 C223.515273,61.851 222.686273,57.512 221.505273,53.33 C220.325273,49.148 218.795273,45.122 216.916273,41.271 C212.845273,32.921 207.254273,25.587 200.268273,19.422 C199.270273,18.541 198.243273,17.684 197.189273,16.851 C191.255273,12.166 184.481273,8.355 177.253273,5.55 C174.156273,4.347 170.975273,3.33 167.741273,2.508 C161.273273,0.863 154.593273,0 147.943273,0 C141.755273,0 135.332273,0.576 128.687273,1.722 C127.025273,2.01 125.350273,2.332 123.661273,2.69 C120.283273,3.406 116.851273,4.265 113.365273,5.267 C104.650273,7.769 95.6022727,11.161 86.2442727,15.433 C78.7592727,18.851 71.0762727,22.832 63.2072727,27.373 C47.9762727,36.162 35.7372727,44.969 29.3592727,49.791 C29.0692727,50.01 28.7922727,50.221 28.5262727,50.423 C26.1382727,52.244 24.7522727,53.367 24.5662727,53.519 L0.549272727,73.065 C0.191272727,73.356 0.00727272727,73.773 0,74.194 C-0.00372727273,74.403 0.0362727273,74.614 0.120272727,74.811 C0.205272727,75.008 0.334272727,75.189 0.508272727,75.341 L11.7612727,85.195 C12.1692727,85.552 12.7252727,85.651 13.2162727,85.487 C13.3792727,85.432 13.5362727,85.348 13.6762727,85.234 L35.8492727,67.382 C36.0422727,67.224 37.6152727,65.949 40.3252727,63.903 C44.1192727,61.036 50.1422727,56.656 57.7292727,51.711 C62.0642727,48.884 66.9102727,45.873 72.1412727,42.854 C100.864273,26.278 126.367273,17.874 147.943273,17.874 C148.366273,17.874 148.790273,17.892 149.213273,17.902 C149.655273,17.911 150.096273,17.911 150.538273,17.93 C153.769273,18.068 156.995273,18.463 160.170273,19.097 C164.931273,20.049 169.577273,21.542 173.953273,23.524 C178.328273,25.505 182.433273,27.975 186.112273,30.88 C186.771273,31.4 187.406273,31.94 188.035273,32.485 C188.913273,33.245 189.771273,34.023 190.591273,34.83 C191.998273,36.217 193.317273,37.673 194.548273,39.195 C196.395273,41.479 198.042273,43.912 199.480273,46.485 C199.960273,47.342 200.417273,48.216 200.850273,49.105 C201.112273,49.642 201.343273,50.196 201.587273,50.743 C202.231273,52.185 202.834273,53.649 203.354273,55.158 C203.712273,56.198 204.041273,57.255 204.340273,58.326 C205.836273,63.683 206.590273,69.417 206.590273,75.469 C206.590273,81.221 205.892273,86.677 204.541273,91.804 C203.617273,95.308 202.397273,98.662 200.850273,101.833 C200.417273,102.722 199.960273,103.595 199.480273,104.453 C197.562273,107.884 195.275273,111.066 192.636273,113.976 C190.657273,116.159 188.480273,118.189 186.113273,120.058 C184.553273,121.29 182.909273,122.432 181.208273,123.503 C180.313273,124.067 179.400273,124.609 178.470273,125.126 C177.462273,125.688 176.442273,126.232 175.398273,126.737 C166.961273,130.823 157.423273,133.064 147.943273,133.064 C126.367273,133.064 100.864273,124.659 72.1412727,108.084 C70.5382727,107.159 68.4382727,105.886 66.3072727,104.575 C65.0292727,103.788 63.7402727,102.986 62.5412727,102.237 C59.3442727,100.238 56.7882727,98.61 56.7882727,98.61 C61.8362727,93.901 69.3232727,87.465 78.6472727,81.047 C80.0092727,80.11 81.4192727,79.174 82.8572727,78.243 C84.1052727,77.436 85.3712727,76.63 86.6732727,75.835 C88.2042727,74.9 89.7802727,73.981 91.3822727,73.074 C93.0482727,72.131 94.7512727,71.207 96.4902727,70.307 C111.473273,62.55 129.094273,56.602 147.943273,56.602 C151.750273,56.602 157.745273,57.825 162.114273,61.276 C162.300273,61.422 162.489273,61.578 162.677273,61.74 C163.337273,62.305 164.006273,62.966 164.634273,63.78 C164.957273,64.198 165.269273,64.657 165.564273,65.162 C166.006273,65.92 166.409273,66.782 166.750273,67.775 C166.891273,68.185 167.016273,68.627 167.134273,69.083 C167.586273,70.833 167.863273,72.924 167.863273,75.469 C167.863273,78.552 167.460273,80.974 166.824273,82.92 C166.578273,83.674 166.300273,84.363 165.992273,84.983 C165.855273,85.259 165.711273,85.524 165.564273,85.776 C165.376273,86.099 165.178273,86.396 164.977273,86.682 C164.631273,87.175 164.269273,87.618 163.900273,88.018 C163.730273,88.202 163.559273,88.379 163.387273,88.546 C162.962273,88.96 162.534273,89.331 162.114273,89.662 C157.745273,93.112 151.750273,94.337 147.943273,94.337 C144.485273,94.337 140.682273,93.926 136.589273,93.121 C133.860273,92.584 131.003273,91.871 128.033273,90.987 C123.579273,89.662 118.873273,87.952 113.970273,85.872 C113.768273,85.786 113.552273,85.747 113.336273,85.753 C113.122273,85.76 112.908273,85.813 112.713273,85.912 C106.990273,88.816 101.641273,91.995 96.7462727,95.223 C96.6232727,95.304 96.5182727,95.397 96.4302727,95.5 C95.8122727,96.22 96.0172727,97.397 96.9492727,97.822 L102.445273,100.328 C104.606273,101.314 106.737273,102.238 108.835273,103.102 C110.934273,103.966 113.001273,104.77 115.035273,105.511 C118.086273,106.624 121.064273,107.599 123.965273,108.436 C127.834273,109.551 131.567273,110.421 135.157273,111.043 C139.646273,111.82 143.912273,112.211 147.943273,112.211 C148.367273,112.211 148.923273,112.201 149.591273,112.169 C149.925273,112.153 150.287273,112.131 150.674273,112.102 C155.712273,111.724 165.055273,110.114 173.190273,103.691 C173.547273,103.41 173.869273,103.105 174.210273,102.813 C175.324273,101.86 176.381273,100.866 177.333273,99.8 C177.470273,99.648 177.590273,99.485 177.724273,99.331 C181.300273,95.167 183.699273,90.185 184.875273,84.406 C185.444273,81.609 185.737273,78.631 185.737273,75.469 C185.737273,63.315 181.516273,53.82 173.190273,47.247 C167.050273,42.399 160.228273,40.299 155.083273,39.395 C153.892273,39.186 152.790273,39.037 151.809273,38.938 C150.116273,38.766 148.774273,38.727 147.943273,38.727 C133.456273,38.727 118.519273,41.679 103.545273,47.5 C99.1222727,49.22 94.6912727,51.191 90.2702727,53.403 C88.7972727,54.141 87.3242727,54.905 85.8542727,55.696 C83.5092727,56.957 81.1722727,58.303 78.8382727,59.697 C77.3922727,60.562 75.9492727,61.451 74.5082727,62.366 C72.4422727,63.678 70.3802727,65.023 68.3302727,66.437 C63.8372727,69.535 59.7422727,72.63 56.0902727,75.567 C54.8732727,76.547 53.7052727,77.508 52.5882727,78.446 C48.1222727,82.2 44.4752727,85.581 41.7602727,88.226 C38.3032727,91.593 36.3592727,93.766 36.1632727,93.986 L35.8282727,94.362 L32.0332727,98.61 L30.6432727,100.164 C30.4962727,100.329 30.3932727,100.517 30.3312727,100.715 C30.1482727,101.307 30.3472727,101.981 30.8882727,102.368 L37.2812727,106.938 L37.4862727,107.083 L37.6922727,107.228 C39.8732727,108.766 42.0702727,110.277 44.2792727,111.758 C45.8422727,112.807 47.4102727,113.84 48.9832727,114.858 C51.5302727,116.508 54.0902727,118.103 56.6542727,119.665 C57.8412727,120.388 59.0282727,121.101 60.2162727,121.804 C61.2142727,122.394 62.2102727,122.989 63.2072727,123.565 C76.9772727,131.512 90.1802727,137.744 102.748273,142.242 C104.544273,142.884 106.326273,143.491 108.096273,144.063 C111.635273,145.206 115.121273,146.207 118.553273,147.067 C121.986273,147.925 125.364273,148.642 128.687273,149.215 C135.332273,150.362 141.755273,150.938 147.943273,150.938 C154.593273,150.938 161.273273,150.074 167.741273,148.43 C174.209273,146.786 180.465273,144.361 186.265273,141.238 C190.133273,139.156 193.798273,136.764 197.189273,134.087 C200.352273,131.589 203.264273,128.872 205.911273,125.949 C207.677273,124 209.325273,121.96 210.854273,119.831 C211.618273,118.766 212.353273,117.68 213.057273,116.571 C214.466273,114.356 215.753273,112.053 216.916273,109.667 C220.701273,101.906 223.073273,93.439 224.008273,84.406 C224.310273,81.485 224.465273,78.505 224.465273,75.469 C224.465273,72.364 224.306273,69.316 223.990273,66.33"),D(a,"id","Fill-1"),D(a,"fill","#146EE6"),D(l,"d","M758.389273,75.346 C752.632273,111.56 742.681273,122.23 712.102273,122.23 C710.847273,122.23 709.640273,122.207 708.464273,122.17 C708.321273,122.191 708.191273,122.23 708.028273,122.23 L637.994273,122.23 C636.795273,122.23 636.315273,121.632 636.435273,120.311 L650.585273,31.22 C650.704273,30.016 651.424273,29.417 652.623273,29.417 L667.852273,29.417 C669.050273,29.417 669.530273,30.016 669.410273,31.22 L657.659273,105.802 L714.249273,105.802 L714.249273,105.787 C714.410273,105.794 714.568273,105.802 714.741273,105.802 C718.878273,105.802 722.250273,105.351 725.040273,104.313 C726.434273,103.794 727.684273,103.129 728.810273,102.298 C729.373273,101.884 729.905273,101.426 730.410273,100.927 C734.951273,96.431 737.231273,88.43 739.322273,75.346 C739.328273,75.312 739.331273,75.282 739.337273,75.25 C739.642273,73.311 739.896273,71.474 740.130273,69.679 C740.203273,69.116 740.272273,68.557 740.338273,68.008 C740.412273,67.392 740.461273,66.821 740.525273,66.222 C742.136273,49.927 738.622273,44.525 724.454273,44.525 C723.419273,44.525 722.433273,44.554 721.490273,44.613 C708.297273,45.444 703.831273,52.303 700.461273,71.126 C700.220273,72.472 699.984273,73.877 699.752273,75.346 C699.483273,77.027 699.255273,78.6 699.052273,80.115 C698.993273,80.545 698.948273,80.946 698.895273,81.361 C698.757273,82.465 698.638273,83.528 698.540273,84.544 C698.502273,84.943 698.466273,85.334 698.434273,85.72 C698.344273,86.815 698.281273,87.856 698.246273,88.847 C698.238273,89.049 698.224273,89.269 698.219273,89.469 C698.161273,91.88 698.289273,93.972 698.621273,95.782 C698.649273,95.941 698.686273,96.089 698.717273,96.246 C698.874273,96.992 699.067273,97.689 699.301273,98.337 C699.346273,98.464 699.390273,98.594 699.439273,98.718 C700.039273,100.231 700.864273,101.478 701.963273,102.469 C702.263273,102.738 702.586273,102.987 702.925273,103.22 L679.436273,103.22 C679.393273,102.969 679.343273,102.727 679.305273,102.471 L679.304273,102.471 C679.304273,102.467 679.304273,102.462 679.303273,102.459 C679.259273,102.17 679.236273,101.854 679.198273,101.558 C679.083273,100.634 678.995273,99.671 678.934273,98.674 C678.908273,98.258 678.879273,97.845 678.862273,97.419 C678.816273,96.174 678.804273,94.876 678.832273,93.518 C678.840273,93.114 678.861273,92.69 678.876273,92.276 C678.920273,91.042 678.991273,89.765 679.092273,88.441 C679.117273,88.109 679.134273,87.79 679.162273,87.452 C679.299273,85.836 679.483273,84.137 679.698273,82.382 C679.750273,81.957 679.807273,81.518 679.863273,81.084 C680.104273,79.238 680.369273,77.344 680.687273,75.346 C681.046273,73.067 681.423273,70.889 681.819273,68.808 C687.040273,41.397 695.809273,30.748 717.267273,28.554 C720.250273,28.25 723.472273,28.103 726.971273,28.103 C726.972273,28.103 726.972273,28.103 726.972273,28.103 C747.994273,28.103 757.680273,33.202 759.811273,48.236 C760.779273,55.067 760.187273,63.953 758.389273,75.346 Z M894.023273,31.336 L866.923273,108.56 C863.472273,118.182 861.113273,121.41 854.499273,122.41 C852.379273,122.733 849.831273,122.828 846.659273,122.828 C831.670273,122.828 830.350273,121.267 829.392273,108.56 L825.794273,63.232 L825.794273,63.231 L807.928273,108.56 C804.255273,117.613 802.201273,120.996 795.961273,122.202 C793.442273,122.687 790.260273,122.829 785.985273,122.829 C772.914273,122.829 770.756273,121.267 770.396273,108.56 L767.638273,31.337 C767.638273,29.899 768.238273,29.417 769.557273,29.417 L785.385273,29.417 C786.464273,29.417 786.704273,29.899 786.824273,31.337 L788.895273,100.572 L788.895273,100.571 C789.054273,103.091 789.563273,103.641 791.021273,103.641 C792.939273,103.641 793.419273,103.042 794.618273,100.043 L820.758273,34.576 C821.358273,33.132 822.437273,32.657 823.516273,32.657 L837.665273,32.657 C838.519273,32.657 839.279273,32.977 839.626273,33.817 C839.718273,34.038 839.799273,34.274 839.824273,34.576 L845.220273,100.043 C845.460273,103.042 845.819273,103.641 847.738273,103.641 C849.297273,103.641 849.896273,103.042 850.976273,100.043 L874.838273,31.336 C875.317273,29.898 875.677273,29.417 876.756273,29.417 L892.584273,29.417 C893.903273,29.417 894.383273,29.898 894.023273,31.336 Z M362.708273,31.219 L357.192273,120.311 C357.192273,121.632 356.353273,122.23 355.154273,122.23 L339.926273,122.23 C338.726273,122.23 338.366273,121.632 338.366273,120.311 L342.324273,62.756 L311.986273,117.551 C311.386273,118.749 310.428273,119.348 309.229273,119.348 L297.837273,119.348 C296.758273,119.348 296.038273,118.749 295.560273,117.551 L282.851273,62.767 L282.848273,62.755 L268.339273,120.31 C268.212273,121.009 267.974273,121.492 267.612273,121.807 C267.288273,122.085 266.865273,122.23 266.301273,122.23 L251.073273,122.23 C249.874273,122.23 249.273273,121.632 249.514273,120.31 L272.296273,31.336 C272.537273,30.138 272.897273,29.417 274.095273,29.417 L288.605273,29.417 C291.236273,29.417 292.726273,29.895 293.682273,31.379 C294.120273,32.059 294.457273,32.928 294.720273,34.095 L307.790273,92.489 L339.326273,34.095 C341.485273,30.256 343.043273,29.299 346.880273,29.299 L361.389273,29.299 C362.376273,29.299 362.682273,30.684 362.682273,30.684 C362.682273,30.684 362.708273,31.029 362.708273,31.219 Z M501.706273,31.219 L499.667273,44.049 C499.547273,45.246 498.708273,45.845 497.509273,45.845 L472.448273,45.845 L460.696273,120.31 C460.457273,121.632 459.738273,122.23 458.538273,122.23 L443.309273,122.23 C442.111273,122.23 441.631273,121.632 441.870273,120.31 L453.622273,45.845 L394.820273,45.845 L391.224273,68.507 L391.224273,68.508 L430.555273,68.508 C431.754273,68.508 432.353273,69.106 432.234273,70.31 L430.196273,82.542 C430.076273,83.738 429.236273,84.338 428.038273,84.338 L388.706273,84.338 L385.349273,105.801 L428.397273,105.801 C429.596273,105.801 430.076273,106.4 429.955273,107.597 L427.797273,120.428 C427.676273,121.632 426.958273,122.23 425.759273,122.23 L365.683273,122.23 C364.484273,122.23 364.004273,121.632 364.124273,120.31 L378.273273,31.219 C378.393273,30.015 379.112273,29.417 380.313273,29.417 L500.147273,29.417 C501.346273,29.417 501.826273,30.015 501.706273,31.219 Z M629.471273,70.426 L627.433273,82.659 C627.313273,83.856 626.473273,84.454 625.275273,84.454 L588.223273,84.454 L582.466273,120.311 C582.347273,121.632 581.627273,122.23 580.428273,122.23 L565.200273,122.23 C564.001273,122.23 563.522273,121.632 563.640273,120.311 L577.790273,31.219 C577.910273,30.016 578.629273,29.417 579.828273,29.417 L643.004273,29.417 C644.202273,29.417 644.802273,30.016 644.682273,31.219 L642.644273,44.05 C642.403273,45.247 641.685273,45.846 640.486273,45.846 L594.337273,45.846 L590.741273,68.631 L627.793273,68.631 C628.991273,68.631 629.592273,69.23 629.471273,70.426 Z M388.706273,84.338 L388.712273,84.338 L388.309273,86.876 L388.706273,84.338 Z M510.726273,79.783 L524.396273,48.006 C525.036273,46.466 525.443273,45.589 525.990273,45.096 C526.465273,44.667 527.044273,44.525 527.993273,44.525 C530.391273,44.525 530.391273,45.124 530.751273,48.006 L534.348273,79.783 L510.726273,79.783 Z M542.334273,29.886 C539.756273,28.905 536.043273,28.702 530.511273,28.702 C516.601273,28.702 513.963273,30.016 508.208273,43.087 L474.633273,120.311 C474.154273,121.749 474.513273,122.23 475.832273,122.23 L491.060273,122.23 C492.259273,122.23 492.500273,121.749 493.099273,120.311 L504.011273,95.372 L536.026273,95.372 L539.024273,120.311 C539.144273,121.749 539.144273,122.23 540.344273,122.23 L555.572273,122.23 C556.891273,122.23 557.490273,121.749 557.490273,120.311 L548.617273,43.087 C547.658273,35.042 546.460273,31.458 542.334273,29.886 L542.334273,29.886 Z"),D(l,"id","Fill-2"),D(l,"fill","#333333"),D(o,"id","metaflow_logo_horizontal"),D(o,"transform","translate(92.930727, 93.190000)"),D(s,"id","Metaflow_Logo_Horizontal_TwoColor_Dark_RGB"),D(s,"transform","translate(-92.000000, -93.000000)"),D(r,"id","Page-1"),D(r,"stroke","none"),D(r,"stroke-width","1"),D(r,"fill","none"),D(r,"fill-rule","evenodd"),D(t,"xmlns","http://www.w3.org/2000/svg"),D(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),D(t,"width","896px"),D(t,"height","152px"),D(t,"viewBox","0 0 896 152"),D(t,"version","1.1")},m(u,c){z(u,t,c),X(t,n),X(n,i),X(t,r),X(r,s),X(s,o),X(o,a),X(o,l)},d(u){u&&L(t)}}}function Tz(e){let t,n,i;return{c(){t=Si("svg"),n=Si("path"),i=Si("path"),D(n,"fill-rule","evenodd"),D(n,"clip-rule","evenodd"),D(n,"d","M223.991 66.33C223.516 61.851 222.687 57.512 221.506 53.33C220.326 49.148 218.796 45.122 216.917 41.271C212.846 32.921 207.255 25.587 200.269 19.422C199.271 18.541 198.244 17.684 197.19 16.851C191.256 12.166 184.482 8.355 177.254 5.55C174.157 4.347 170.976 3.33 167.742 2.508C161.274 0.863 154.594 0 147.944 0C141.756 0 135.333 0.576 128.688 1.722C127.026 2.01 125.351 2.332 123.662 2.69C120.284 3.406 116.852 4.265 113.366 5.267C104.651 7.769 95.6025 11.161 86.2445 15.433C78.7595 18.851 71.0765 22.832 63.2075 27.373C47.9765 36.162 35.7375 44.969 29.3595 49.791C29.0695 50.01 28.7925 50.221 28.5265 50.423C26.1385 52.244 24.7525 53.367 24.5665 53.519L0.549511 73.065C0.191511 73.356 0.00751099 73.773 0.000238261 74.194C-0.00348901 74.403 0.036511 74.614 0.120511 74.811C0.205511 75.008 0.334511 75.189 0.508511 75.341L11.7615 85.195C12.1695 85.552 12.7255 85.651 13.2165 85.487C13.3795 85.432 13.5365 85.348 13.6765 85.234L35.8495 67.382C36.0425 67.224 37.6155 65.949 40.3255 63.903C44.1195 61.036 50.1425 56.656 57.7295 51.711C62.0645 48.884 66.9105 45.873 72.1415 42.854C100.865 26.278 126.368 17.874 147.944 17.874C148.367 17.874 148.791 17.892 149.214 17.902C149.656 17.911 150.097 17.911 150.539 17.93C153.77 18.068 156.996 18.463 160.171 19.097C164.932 20.049 169.578 21.542 173.954 23.524C178.329 25.505 182.434 27.975 186.113 30.88C186.772 31.4 187.407 31.94 188.036 32.485C188.914 33.245 189.772 34.023 190.592 34.83C191.999 36.217 193.318 37.673 194.549 39.195C196.396 41.479 198.043 43.912 199.481 46.485C199.961 47.342 200.418 48.216 200.851 49.105C201.113 49.642 201.344 50.196 201.588 50.743C202.232 52.185 202.835 53.649 203.355 55.158C203.713 56.198 204.042 57.255 204.341 58.326C205.837 63.683 206.591 69.417 206.591 75.469C206.591 81.221 205.893 86.677 204.542 91.804C203.618 95.308 202.398 98.662 200.851 101.833C200.418 102.722 199.961 103.595 199.481 104.453C197.563 107.884 195.276 111.066 192.637 113.976C190.658 116.159 188.481 118.189 186.114 120.058C184.554 121.29 182.91 122.432 181.209 123.503C180.314 124.067 179.401 124.609 178.471 125.126C177.463 125.688 176.443 126.232 175.399 126.737C166.962 130.823 157.424 133.064 147.944 133.064C126.368 133.064 100.865 124.659 72.1415 108.084C70.5385 107.159 68.4385 105.886 66.3075 104.575C65.0295 103.788 63.7405 102.986 62.5415 102.237C59.3445 100.238 56.7885 98.61 56.7885 98.61C61.8365 93.901 69.3235 87.465 78.6475 81.047C80.0095 80.11 81.4195 79.174 82.8575 78.243C84.1055 77.436 85.3715 76.63 86.6735 75.835C88.2045 74.9 89.7805 73.981 91.3825 73.074C93.0485 72.131 94.7515 71.207 96.4905 70.307C111.474 62.55 129.095 56.602 147.944 56.602C151.751 56.602 157.746 57.825 162.115 61.276C162.301 61.422 162.49 61.578 162.678 61.74C163.338 62.305 164.007 62.966 164.635 63.78C164.958 64.198 165.27 64.657 165.565 65.162C166.007 65.92 166.41 66.782 166.751 67.775C166.892 68.185 167.017 68.627 167.135 69.083C167.587 70.833 167.864 72.924 167.864 75.469C167.864 78.552 167.461 80.974 166.825 82.92C166.579 83.674 166.301 84.363 165.993 84.983C165.856 85.259 165.712 85.524 165.565 85.776C165.377 86.099 165.179 86.396 164.978 86.682C164.632 87.175 164.27 87.618 163.901 88.018C163.731 88.202 163.56 88.379 163.388 88.546C162.963 88.96 162.535 89.331 162.115 89.662C157.746 93.112 151.751 94.337 147.944 94.337C144.486 94.337 140.683 93.926 136.59 93.121C133.861 92.584 131.004 91.871 128.034 90.987C123.58 89.662 118.874 87.952 113.971 85.872C113.769 85.786 113.553 85.747 113.337 85.753C113.123 85.76 112.909 85.813 112.714 85.912C106.991 88.816 101.642 91.995 96.7465 95.223C96.6235 95.304 96.5185 95.397 96.4305 95.5C95.8125 96.22 96.0175 97.397 96.9495 97.822L102.446 100.328C104.607 101.314 106.738 102.238 108.836 103.102C110.935 103.966 113.002 104.77 115.036 105.511C118.087 106.624 121.065 107.599 123.966 108.436C127.835 109.551 131.568 110.421 135.158 111.043C139.647 111.82 143.913 112.211 147.944 112.211C148.368 112.211 148.924 112.201 149.592 112.169C149.926 112.153 150.288 112.131 150.675 112.102C155.713 111.724 165.056 110.114 173.191 103.691C173.548 103.41 173.87 103.105 174.211 102.813C175.325 101.86 176.382 100.866 177.334 99.8C177.471 99.648 177.591 99.485 177.725 99.331C181.301 95.167 183.7 90.185 184.876 84.406C185.445 81.609 185.738 78.631 185.738 75.469C185.738 63.315 181.517 53.82 173.191 47.247C167.051 42.399 160.229 40.299 155.084 39.395C153.893 39.186 152.791 39.037 151.81 38.938C150.117 38.766 148.775 38.727 147.944 38.727C133.457 38.727 118.52 41.679 103.546 47.5C99.1225 49.22 94.6915 51.191 90.2705 53.403C88.7975 54.141 87.3245 54.905 85.8545 55.696C83.5095 56.957 81.1725 58.303 78.8385 59.697C77.3925 60.562 75.9495 61.451 74.5085 62.366C72.4425 63.678 70.3805 65.023 68.3305 66.437C63.8375 69.535 59.7425 72.63 56.0905 75.567C54.8735 76.547 53.7055 77.508 52.5885 78.446C48.1225 82.2 44.4755 85.581 41.7605 88.226C38.3035 91.593 36.3595 93.766 36.1635 93.986L35.8285 94.362L32.0335 98.61L30.6435 100.164C30.4965 100.329 30.3935 100.517 30.3315 100.715C30.1485 101.307 30.3475 101.981 30.8885 102.368L37.2815 106.938L37.4865 107.083L37.6925 107.228C39.8735 108.766 42.0705 110.277 44.2795 111.758C45.8425 112.807 47.4105 113.84 48.9835 114.858C51.5305 116.508 54.0905 118.103 56.6545 119.665C57.8415 120.388 59.0285 121.101 60.2165 121.804C61.2145 122.394 62.2105 122.989 63.2075 123.565C76.9775 131.512 90.1805 137.744 102.749 142.242C104.545 142.884 106.327 143.491 108.097 144.063C111.636 145.206 115.122 146.207 118.554 147.067C121.987 147.925 125.365 148.642 128.688 149.215C135.333 150.362 141.756 150.938 147.944 150.938C154.594 150.938 161.274 150.074 167.742 148.43C174.21 146.786 180.466 144.361 186.266 141.238C190.134 139.156 193.799 136.764 197.19 134.087C200.353 131.589 203.265 128.872 205.912 125.949C207.678 124 209.326 121.96 210.855 119.831C211.619 118.766 212.354 117.68 213.058 116.571C214.467 114.356 215.754 112.053 216.917 109.667C220.702 101.906 223.074 93.439 224.009 84.406C224.311 81.485 224.466 78.505 224.466 75.469C224.466 72.364 224.307 69.316 223.991 66.33Z"),D(n,"fill","#146EE6"),D(i,"fill-rule","evenodd"),D(i,"clip-rule","evenodd"),D(i,"d","M758.39 75.346C752.633 111.56 742.682 122.23 712.103 122.23C710.848 122.23 709.641 122.207 708.465 122.17C708.322 122.191 708.192 122.23 708.029 122.23H637.995C636.796 122.23 636.316 121.632 636.436 120.311L650.586 31.22C650.705 30.016 651.425 29.417 652.624 29.417H667.853C669.051 29.417 669.531 30.016 669.411 31.22L657.66 105.802H714.25V105.787C714.411 105.794 714.569 105.802 714.742 105.802C718.879 105.802 722.251 105.351 725.041 104.313C726.435 103.794 727.685 103.129 728.811 102.298C729.374 101.884 729.906 101.426 730.411 100.927C734.952 96.431 737.232 88.43 739.323 75.346C739.329 75.312 739.332 75.282 739.338 75.25C739.643 73.311 739.896 71.474 740.13 69.679C740.203 69.116 740.273 68.557 740.339 68.008C740.413 67.392 740.462 66.821 740.526 66.222C742.137 49.927 738.623 44.525 724.455 44.525C723.42 44.525 722.434 44.554 721.491 44.613C708.298 45.444 703.831 52.303 700.461 71.126C700.22 72.472 699.985 73.877 699.753 75.346C699.484 77.027 699.255 78.6 699.052 80.115C698.993 80.545 698.949 80.946 698.896 81.361C698.758 82.465 698.639 83.528 698.541 84.544C698.503 84.943 698.467 85.334 698.435 85.72C698.345 86.815 698.282 87.856 698.247 88.847C698.239 89.049 698.225 89.269 698.22 89.469C698.162 91.88 698.29 93.972 698.622 95.782C698.65 95.941 698.687 96.089 698.718 96.246C698.875 96.992 699.068 97.689 699.302 98.337C699.347 98.464 699.391 98.594 699.44 98.718C700.04 100.231 700.865 101.478 701.964 102.469C702.264 102.738 702.587 102.987 702.926 103.22H679.437C679.394 102.969 679.344 102.727 679.306 102.471H679.305C679.305 102.467 679.305 102.462 679.304 102.459C679.26 102.17 679.237 101.854 679.199 101.558C679.084 100.634 678.996 99.671 678.935 98.674C678.909 98.258 678.879 97.845 678.862 97.419C678.816 96.174 678.805 94.876 678.833 93.518C678.841 93.114 678.862 92.69 678.877 92.276C678.921 91.042 678.992 89.765 679.093 88.441C679.118 88.109 679.135 87.79 679.163 87.452C679.3 85.836 679.484 84.137 679.699 82.382C679.751 81.957 679.808 81.518 679.864 81.084C680.105 79.238 680.37 77.344 680.688 75.346C681.046 73.067 681.424 70.889 681.82 68.808C687.041 41.397 695.81 30.748 717.268 28.554C720.251 28.25 723.472 28.103 726.971 28.103C726.972 28.103 726.973 28.103 726.973 28.103C747.995 28.103 757.681 33.202 759.812 48.236C760.78 55.067 760.188 63.953 758.39 75.346ZM894.023 31.336L866.924 108.56C863.473 118.182 861.114 121.41 854.5 122.41C852.38 122.733 849.832 122.828 846.66 122.828C831.671 122.828 830.351 121.267 829.393 108.56L825.794 63.232V63.231L807.929 108.56C804.256 117.613 802.201 120.996 795.961 122.202C793.442 122.687 790.261 122.829 785.986 122.829C772.915 122.829 770.757 121.267 770.397 108.56L767.638 31.337C767.638 29.899 768.238 29.417 769.557 29.417H785.385C786.464 29.417 786.705 29.899 786.825 31.337L788.896 100.572V100.571C789.055 103.091 789.564 103.641 791.022 103.641C792.94 103.641 793.42 103.042 794.619 100.043L820.759 34.576C821.359 33.132 822.438 32.657 823.517 32.657H837.666C838.52 32.657 839.28 32.977 839.627 33.817C839.719 34.038 839.8 34.274 839.825 34.576L845.221 100.043C845.461 103.042 845.82 103.641 847.739 103.641C849.298 103.641 849.897 103.042 850.977 100.043L874.839 31.336C875.318 29.898 875.678 29.417 876.757 29.417H892.585C893.904 29.417 894.383 29.898 894.023 31.336ZM362.709 31.219L357.193 120.311C357.193 121.632 356.354 122.23 355.155 122.23H339.927C338.727 122.23 338.367 121.632 338.367 120.311L342.325 62.756L311.987 117.551C311.387 118.749 310.429 119.348 309.23 119.348H297.838C296.759 119.348 296.039 118.749 295.561 117.551L282.852 62.767L282.849 62.755L268.34 120.31C268.213 121.009 267.975 121.492 267.613 121.807C267.289 122.085 266.866 122.23 266.302 122.23H251.074C249.875 122.23 249.274 121.632 249.515 120.31L272.297 31.336C272.538 30.138 272.898 29.417 274.096 29.417H288.606C291.237 29.417 292.727 29.895 293.683 31.379C294.121 32.059 294.458 32.928 294.721 34.095L307.791 92.489L339.327 34.095C341.486 30.256 343.044 29.299 346.881 29.299H361.39C362.377 29.299 362.683 30.684 362.683 30.684C362.683 30.684 362.709 31.029 362.709 31.219ZM501.707 31.219L499.668 44.049C499.548 45.246 498.709 45.845 497.51 45.845H472.449L460.697 120.31C460.458 121.632 459.739 122.23 458.539 122.23H443.31C442.112 122.23 441.632 121.632 441.871 120.31L453.623 45.845H394.821L391.225 68.507V68.508H430.556C431.755 68.508 432.354 69.106 432.235 70.31L430.197 82.542C430.077 83.738 429.237 84.338 428.039 84.338H388.707L385.35 105.801H428.398C429.597 105.801 430.077 106.4 429.956 107.597L427.798 120.428C427.677 121.632 426.959 122.23 425.76 122.23H365.684C364.485 122.23 364.005 121.632 364.125 120.31L378.274 31.219C378.394 30.015 379.113 29.417 380.314 29.417H500.148C501.347 29.417 501.827 30.015 501.707 31.219ZM629.471 70.426L627.434 82.659C627.314 83.856 626.474 84.454 625.276 84.454H588.224L582.466 120.311C582.347 121.632 581.628 122.23 580.429 122.23H565.201C564.002 122.23 563.523 121.632 563.641 120.311L577.791 31.219C577.911 30.016 578.629 29.417 579.828 29.417H643.005C644.203 29.417 644.802 30.016 644.682 31.219L642.645 44.05C642.404 45.247 641.686 45.846 640.487 45.846H594.338L590.742 68.631H627.794C628.992 68.631 629.592 69.23 629.471 70.426ZM388.707 84.338H388.713L388.31 86.876L388.707 84.338ZM510.727 79.783L524.397 48.006C525.037 46.466 525.444 45.589 525.991 45.096C526.466 44.667 527.045 44.525 527.994 44.525C530.392 44.525 530.392 45.124 530.752 48.006L534.349 79.783H510.727ZM542.335 29.886C539.757 28.905 536.044 28.702 530.512 28.702C516.602 28.702 513.964 30.016 508.209 43.087L474.634 120.311C474.155 121.749 474.514 122.23 475.833 122.23H491.061C492.26 122.23 492.501 121.749 493.1 120.311L504.012 95.372H536.026L539.025 120.311C539.145 121.749 539.145 122.23 540.345 122.23H555.573C556.892 122.23 557.491 121.749 557.491 120.311L548.617 43.087C547.658 35.042 546.461 31.458 542.335 29.886Z"),D(i,"fill","white"),D(t,"width","895"),D(t,"height","151"),D(t,"viewBox","0 0 895 151"),D(t,"fill","none"),D(t,"xmlns","http://www.w3.org/2000/svg")},m(r,s){z(r,t,s),X(t,n),X(t,i)},d(r){r&&L(t)}}}function Mz(e){let t;function n(s,o){return s[0]?Tz:Az}let i=n(e),r=i(e);return{c(){r.c(),t=Ae()},m(s,o){r.m(s,o),z(s,t,o)},p(s,[o]){i!==(i=n(s))&&(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},i:re,o:re,d(s){s&&L(t),r.d(s)}}}function Fz(e,t,n){let{light:i=!1}=t;return e.$$set=r=>{"light"in r&&n(0,i=r.light)},[i]}class Dz extends ve{constructor(t){super(),be(this,t,Fz,Mz,he,{light:0})}}function Nz(e){let t,n,i,r,s,o;r=new Dz({});const a=e[1].default,l=ct(a,e,e[0],null);return{c(){t=H("aside"),n=H("div"),i=H("div"),ce(r.$$.fragment),s=je(),l&&l.c(),D(i,"class","logoContainer"),D(t,"class","svelte-1okdv0e")},m(u,c){z(u,t,c),X(t,n),X(n,i),le(r,i,null),X(n,s),l&&l.m(n,null),o=!0},p(u,[c]){l&&l.p&&(!o||c&1)&&dt(l,a,u,u[0],o?ft(a,u[0],c,null):ht(u[0]),null)},i(u){o||(F(r.$$.fragment,u),F(l,u),o=!0)},o(u){N(r.$$.fragment,u),N(l,u),o=!1},d(u){u&&L(t),ue(r),l&&l.d(u)}}}function Oz(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class Rz extends ve{constructor(t){super(),be(this,t,Oz,Nz,he,{})}}function z5(e){let t,n;return{c(){t=H("td"),n=Be(e[0]),D(t,"class","idCell svelte-pt8vzv"),D(t,"data-component","artifact-row")},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&1&&pt(n,i[0])},d(i){i&&L(t)}}}function Lz(e){let t,n,i,r,s=e[1].data+"",o,a,l=e[0]!==null&&z5(e);return{c(){t=H("tr"),l&&l.c(),n=je(),i=H("td"),r=H("code"),o=Be(s),D(r,"class","mono"),D(i,"class","codeCell svelte-pt8vzv"),D(i,"colspan",a=e[0]===null?2:1),D(i,"data-component","artifact-row")},m(u,c){z(u,t,c),l&&l.m(t,null),X(t,n),X(t,i),X(i,r),X(r,o),e[3](r)},p(u,[c]){u[0]!==null?l?l.p(u,c):(l=z5(u),l.c(),l.m(t,n)):l&&(l.d(1),l=null),c&2&&s!==(s=u[1].data+"")&&pt(o,s),c&1&&a!==(a=u[0]===null?2:1)&&D(i,"colspan",a)},i:re,o:re,d(u){u&&L(t),l&&l.d(),e[3](null)}}}function Iz(e,t,n){let{id:i}=t,{artifact:r}=t,s;function o(){var l;s&&!s.classList.contains("language-python")&&typeof window<"u"&&((l=window==null?void 0:window.Prism)==null||l.highlightElement(s))}function a(l){Xi[l?"unshift":"push"](()=>{s=l,n(2,s)})}return e.$$set=l=>{"id"in l&&n(0,i=l.id),"artifact"in l&&n(1,r=l.artifact)},e.$$.update=()=>{e.$$.dirty&4&&s&&o()},[i,r,s,a]}class zz extends ve{constructor(t){super(),be(this,t,Iz,Lz,he,{id:0,artifact:1})}}function P5(e,t,n){const i=e.slice();return i[2]=t[n],i}function B5(e){let t,n;return t=new zz({props:{id:e[2].name,artifact:e[2]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p:re,i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function Pz(e){let t,n,i,r=Oe(e[0]),s=[];for(let a=0;a<r.length;a+=1)s[a]=B5(P5(e,r,a));const o=a=>N(s[a],1,1,()=>{s[a]=null});return{c(){t=H("div"),n=H("table");for(let a=0;a<s.length;a+=1)s[a].c();D(n,"class","language-python svelte-ubs992"),D(t,"class","container svelte-ubs992"),D(t,"data-component","artifacts")},m(a,l){z(a,t,l),X(t,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(n,null);i=!0},p(a,[l]){if(l&1){r=Oe(a[0]);let u;for(u=0;u<r.length;u+=1){const c=P5(a,r,u);s[u]?(s[u].p(c,l),F(s[u],1)):(s[u]=B5(c),s[u].c(),F(s[u],1),s[u].m(n,null))}for($e(),u=r.length;u<s.length;u+=1)o(u);Ee()}},i(a){if(!i){for(let l=0;l<r.length;l+=1)F(s[l]);i=!0}},o(a){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)N(s[l]);i=!1},d(a){a&&L(t),Rt(s,a)}}}function Bz(e,t,n){let{componentData:i}=t;const r=i==null?void 0:i.data.sort((s,o)=>{if(s.name&&o.name){if(s.name>o.name)return 1;if(s.name<o.name)return-1}return 0});return e.$$set=s=>{"componentData"in s&&n(1,i=s.componentData)},[r,i]}class j5 extends ve{constructor(t){super(),be(this,t,Bz,Pz,he,{componentData:1})}}function jz(e){let t,n,i;return{c(){t=H("div"),n=je(),i=H("div"),D(t,"class","path topLeft svelte-1hyaq5f"),D(i,"class","path bottomRight svelte-1hyaq5f")},m(r,s){z(r,t,s),z(r,n,s),z(r,i,s)},d(r){r&&(L(t),L(n),L(i))}}}function Uz(e){let t;return{c(){t=H("div"),D(t,"class","path straightLine svelte-1hyaq5f")},m(n,i){z(n,t,i)},d(n){n&&L(t)}}}function qz(e){let t;function n(s,o){return s[5]?Uz:jz}let i=n(e),r=i(e);return{c(){t=H("div"),r.c(),D(t,"class","connectorwrapper svelte-1hyaq5f"),ci(t,"top",e[1]+"rem"),ci(t,"left",e[0]+"rem"),ci(t,"width",e[3]+"rem"),ci(t,"height",e[4]+"rem"),Vn(t,"flip",e[2])},m(s,o){z(s,t,o),r.m(t,null)},p(s,[o]){i!==(i=n(s))&&(r.d(1),r=i(s),r&&(r.c(),r.m(t,null))),o&2&&ci(t,"top",s[1]+"rem"),o&1&&ci(t,"left",s[0]+"rem"),o&8&&ci(t,"width",s[3]+"rem"),o&16&&ci(t,"height",s[4]+"rem"),o&4&&Vn(t,"flip",s[2])},i:re,o:re,d(s){s&&L(t),r.d()}}}const ca=.5;function Wz(e,t,n){let{top:i=0}=t,{left:r=0}=t,{bottom:s=0}=t,{right:o=0}=t,a,l,u,c=!1;return e.$$set=f=>{"top"in f&&n(1,i=f.top),"left"in f&&n(0,r=f.left),"bottom"in f&&n(7,s=f.bottom),"right"in f&&n(6,o=f.right)},e.$$.update=()=>{e.$$.dirty&207&&(n(2,a=o-r<0),n(3,l=Math.abs(o-r)),l<=ca?(n(3,l=ca),n(5,c=!0),n(0,r-=ca/2)):(a?(n(0,r+=ca/2),n(6,o-=ca/2)):(n(0,r-=ca/2),n(6,o+=ca/2)),n(3,l=Math.abs(o-r))),n(4,u=s-i))},[r,i,a,l,u,c,o,s]}class Hz extends ve{constructor(t){super(),be(this,t,Wz,qz,he,{top:1,left:0,bottom:7,right:6})}}function U5(e,t,n){const i=e.slice();return i[4]=t[n],i}function q5(e){let t,n;return t=new Hz({props:{top:to(e[4].top),left:to(e[4].left),bottom:to(e[4].bottom),right:to(e[4].right)}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.top=to(i[4].top)),r&1&&(s.left=to(i[4].left)),r&1&&(s.bottom=to(i[4].bottom)),r&1&&(s.right=to(i[4].right)),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function Gz(e){let t,n,i=Oe(e[0]),r=[];for(let o=0;o<i.length;o+=1)r[o]=q5(U5(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,[a]){if(a&1){i=Oe(o[0]);let l;for(l=0;l<i.length;l+=1){const u=U5(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=q5(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function Vz(e,t,n){let{steps:i}=t,{boxes:r}=t,{container:s}=t,o=[];return e.$$set=a=>{"steps"in a&&n(1,i=a.steps),"boxes"in a&&n(2,r=a.boxes),"container"in a&&n(3,s=a.container)},e.$$.update=()=>{if(e.$$.dirty&15){n(0,o=[]);const a=s.getBoundingClientRect(),l=a.top,u=a.left;r&&Object.keys(i).forEach(c=>{var h;const f=i[c],d=r[c].getBoundingClientRect();(h=f.next)==null||h.forEach(p=>{const g=r[p].getBoundingClientRect(),m={top:d.bottom-l,left:d.left-u+d.width/2,bottom:g.top-l,right:g.left-u+g.width/2};n(0,o=[...o,m])})})}},[o,i,r,s]}class Xz extends ve{constructor(t){super(),be(this,t,Vz,Gz,he,{steps:1,boxes:2,container:3})}}const W5="currentStep";function H5(e,t,n){const i=e.slice();return i[16]=t[n],i[18]=n,i}function G5(e){let t,n,i;return{c(){t=H("div"),n=Be("x"),i=Be(e[6]),D(t,"class","levelstoshow svelte-117ceti")},m(r,s){z(r,t,s),X(t,n),X(t,i)},p(r,s){s&64&&pt(i,r[6])},d(r){r&&L(t)}}}function V5(e){let t,n;return{c(){t=H("div"),D(t,"class",n="level rectangle "+e[16]+" svelte-117ceti"),ci(t,"z-index",(e[18]+1)*-1),ci(t,"top",(e[18]+1)*X5+"px"),ci(t,"left",(e[18]+1)*X5+"px")},m(i,r){z(i,t,r)},p(i,r){r&128&&n!==(n="level rectangle "+i[16]+" svelte-117ceti")&&D(t,"class",n)},d(i){i&&L(t)}}}function Yz(e){let t,n,i,r,s,o,a,l,u=e[2].doc+"",c,f,d,h=e[6]&&G5(e),p=Oe(e[7]),g=[];for(let m=0;m<p.length;m+=1)g[m]=V5(H5(e,p,m));return{c(){t=H("div"),h&&h.c(),n=je(),i=H("div"),r=H("div"),s=H("span"),o=Be(e[1]),a=je(),l=H("div"),c=Be(u),d=je();for(let m=0;m<g.length;m+=1)g[m].c();D(s,"class","name svelte-117ceti"),D(l,"class","description svelte-117ceti"),D(l,"title",f=e[9]?e[2].doc:void 0),Vn(l,"overflown",e[9]),D(r,"class","inner svelte-117ceti"),D(i,"class","step rectangle svelte-117ceti"),Vn(i,"success",e[3]),Vn(i,"running",e[5]),Vn(i,"error",e[4]),D(t,"class","wrapper svelte-117ceti"),Vn(t,"current",e[10])},m(m,y){z(m,t,y),h&&h.m(t,null),X(t,n),X(t,i),X(i,r),X(r,s),X(s,o),X(r,a),X(r,l),X(l,c),e[12](l),e[13](i),X(t,d);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(t,null)},p(m,[y]){if(m[6]?h?h.p(m,y):(h=G5(m),h.c(),h.m(t,n)):h&&(h.d(1),h=null),y&2&&pt(o,m[1]),y&4&&u!==(u=m[2].doc+"")&&pt(c,u),y&516&&f!==(f=m[9]?m[2].doc:void 0)&&D(l,"title",f),y&512&&Vn(l,"overflown",m[9]),y&8&&Vn(i,"success",m[3]),y&32&&Vn(i,"running",m[5]),y&16&&Vn(i,"error",m[4]),y&128){p=Oe(m[7]);let b;for(b=0;b<p.length;b+=1){const v=H5(m,p,b);g[b]?g[b].p(v,y):(g[b]=V5(v),g[b].c(),g[b].m(t,null))}for(;b<g.length;b+=1)g[b].d(1);g.length=p.length}},i:re,o:re,d(m){m&&L(t),h&&h.d(),e[12](null),e[13](null),Rt(g,m)}}}const X5=4,Zz=3;function Kz(e,t,n){let{name:i}=t,{step:r}=t,{numLevels:s=0}=t,{el:o}=t,a=!1,l=!1,u=!1,c;const f={3:3,100:4,1e3:5,1e4:6};let d=[];r.num_possible_tasks?(r.num_possible_tasks>1&&(c=new Intl.NumberFormat().format(r.num_possible_tasks)),s=r.num_possible_tasks-1,Object.keys(f).forEach(v=>{const x=Number.parseInt(v);r.num_possible_tasks&&r.num_possible_tasks>x&&n(11,s=f[x])})):s*=Zz,s>0&&(d=new Array(s).fill("")),d=d.map((v,x)=>{if(r.num_possible_tasks){const _=r.num_failed??0,k=r.successful_tasks??0;return(_-1)/r.num_possible_tasks>=(x+1)/d.length?"error":(_+k)/r.num_possible_tasks>=(x+1)/d.length?"success":"running"}return""});const h=D5(W5),p=i===h;r.failed||r.num_failed?l=!0:(r.num_possible_tasks??0)>(r.successful_tasks??0)?u=!0:r.num_possible_tasks&&r.num_possible_tasks===r.successful_tasks&&(a=!0);let g,m=!1;Mc(()=>{n(9,m=Sz(g))});function y(v){Xi[v?"unshift":"push"](()=>{g=v,n(8,g)})}function b(v){Xi[v?"unshift":"push"](()=>{o=v,n(0,o)})}return e.$$set=v=>{"name"in v&&n(1,i=v.name),"step"in v&&n(2,r=v.step),"numLevels"in v&&n(11,s=v.numLevels),"el"in v&&n(0,o=v.el)},[o,i,r,a,l,u,c,d,g,m,p,s,y,b]}let Jz=class extends ve{constructor(t){super(),be(this,t,Kz,Yz,he,{name:1,step:2,numLevels:11,el:0})}};function Y5(e,t,n){const i=e.slice();return i[10]=t[n],i}function Qz(e){let t,n,i,r,s,o;function a(f){e[8](f)}let l={name:e[2],numLevels:e[3],step:e[5]};e[4]!==void 0&&(l.el=e[4]),n=new Jz({props:l}),Xi.push(()=>Gm(n,"el",a));let u=e[7]&&eP(e),c=e[5].box_ends&&tP(e);return{c(){t=H("div"),ce(n.$$.fragment),r=je(),u&&u.c(),s=je(),c&&c.c(),D(t,"class","stepwrapper svelte-18aex7a")},m(f,d){z(f,t,d),le(n,t,null),X(t,r),u&&u.m(t,null),X(t,s),c&&c.m(t,null),o=!0},p(f,d){const h={};d&4&&(h.name=f[2]),d&8&&(h.numLevels=f[3]),!i&&d&16&&(i=!0,h.el=f[4],Wm(()=>i=!1)),n.$set(h),f[7]&&u.p(f,d),f[5].box_ends&&c.p(f,d)},i(f){o||(F(n.$$.fragment,f),F(u),F(c),o=!0)},o(f){N(n.$$.fragment,f),N(u),N(c),o=!1},d(f){f&&L(t),ue(n),u&&u.d(),c&&c.d()}}}function eP(e){let t,n,i,r,s=Oe(e[5].next),o=[];for(let l=0;l<s.length;l+=1)o[l]=Z5(Y5(e,s,l));const a=l=>N(o[l],1,1,()=>{o[l]=null});return{c(){t=H("div"),n=je(),i=H("div");for(let l=0;l<o.length;l+=1)o[l].c();D(t,"class","gap svelte-18aex7a"),D(i,"class","childwrapper svelte-18aex7a")},m(l,u){z(l,t,u),z(l,n,u),z(l,i,u);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(i,null);r=!0},p(l,u){if(u&99){s=Oe(l[5].next);let c;for(c=0;c<s.length;c+=1){const f=Y5(l,s,c);o[c]?(o[c].p(f,u),F(o[c],1)):(o[c]=Z5(f),o[c].c(),F(o[c],1),o[c].m(i,null))}for($e(),c=s.length;c<o.length;c+=1)a(c);Ee()}},i(l){if(!r){for(let u=0;u<s.length;u+=1)F(o[u]);r=!0}},o(l){o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)N(o[u]);r=!1},d(l){l&&(L(t),L(n),L(i)),Rt(o,l)}}}function Z5(e){let t,n;return t=new Vm({props:{steps:e[1],stepName:e[10],levels:e[6],boxes:e[0]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&2&&(s.steps=i[1]),r&1&&(s.boxes=i[0]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function tP(e){let t,n,i,r;return i=new Vm({props:{steps:e[1],stepName:e[5].box_ends,levels:e[3],boxes:e[0]}}),{c(){t=H("div"),n=je(),ce(i.$$.fragment),D(t,"class","gap svelte-18aex7a")},m(s,o){z(s,t,o),z(s,n,o),le(i,s,o),r=!0},p(s,o){const a={};o&2&&(a.steps=s[1]),o&8&&(a.levels=s[3]),o&1&&(a.boxes=s[0]),i.$set(a)},i(s){r||(F(i.$$.fragment,s),r=!0)},o(s){N(i.$$.fragment,s),r=!1},d(s){s&&(L(t),L(n)),ue(i,s)}}}function nP(e){let t,n,i=e[5]&&Qz(e);return{c(){i&&i.c(),t=Ae()},m(r,s){i&&i.m(r,s),z(r,t,s),n=!0},p(r,[s]){r[5]&&i.p(r,s)},i(r){n||(F(i),n=!0)},o(r){N(i),n=!1},d(r){r&&L(t),i&&i.d(r)}}}function iP(e,t,n){var h;let{steps:i}=t,{stepName:r}=t,{levels:s=0}=t,{boxes:o={}}=t,a=null;Mc(()=>{a&&n(0,o[r]=a,o)});let u=i[r];u||console.warn("step ",r," not found");const c=(u==null?void 0:u.type)==="foreach"?s+1:(u==null?void 0:u.type)==="join"?s-1:s;let f=(h=u==null?void 0:u.next)==null?void 0:h.find(p=>{var g;return((g=i[p])==null?void 0:g.type)!=="join"});function d(p){a=p,n(4,a)}return e.$$set=p=>{"steps"in p&&n(1,i=p.steps),"stepName"in p&&n(2,r=p.stepName),"levels"in p&&n(3,s=p.levels),"boxes"in p&&n(0,o=p.boxes)},[o,i,r,s,a,u,c,f,d]}class Vm extends ve{constructor(t){super(),be(this,t,iP,nP,he,{steps:1,stepName:2,levels:3,boxes:0})}}function rP(e){let t;return{c(){t=H("p"),t.textContent="No start step"},m(n,i){z(n,t,i)},p:re,i:re,o:re,d(n){n&&L(t)}}}function sP(e){let t,n,i;function r(o){e[6](o)}let s={steps:e[3],stepName:"start"};return e[0]!==void 0&&(s.boxes=e[0]),t=new Vm({props:s}),Xi.push(()=>Gm(t,"boxes",r)),{c(){ce(t.$$.fragment)},m(o,a){le(t,o,a),i=!0},p(o,a){const l={};!n&&a&1&&(n=!0,l.boxes=o[0],Wm(()=>n=!1)),t.$set(l)},i(o){i||(F(t.$$.fragment,o),i=!0)},o(o){N(t.$$.fragment,o),i=!1},d(o){ue(t,o)}}}function K5(e){let t,n;return t=new Xz({props:{boxes:e[0],steps:e[3],container:e[1]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.boxes=i[0]),r&2&&(s.container=i[1]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function oP(e){let t,n,i,r,s=!e[2]&&Object.keys(e[0]).length,o,a,l;const u=[sP,rP],c=[];function f(h,p){var g;return(g=h[3])!=null&&g.start?0:1}n=f(e),i=c[n]=u[n](e);let d=s&&K5(e);return{c(){t=H("div"),i.c(),r=je(),d&&d.c(),ci(t,"position","relative"),ci(t,"line-height","1"),D(t,"data-component","dag")},m(h,p){z(h,t,p),c[n].m(t,null),X(t,r),d&&d.m(t,null),e[7](t),o=!0,a||(l=Il(window,"resize",e[4]),a=!0)},p(h,[p]){i.p(h,p),p&5&&(s=!h[2]&&Object.keys(h[0]).length),s?d?(d.p(h,p),p&5&&F(d,1)):(d=K5(h),d.c(),F(d,1),d.m(t,null)):d&&($e(),N(d,1,1,()=>{d=null}),Ee())},i(h){o||(F(i),F(d),o=!0)},o(h){N(i),N(d),o=!1},d(h){h&&L(t),c[n].d(),d&&d.d(),e[7](null),a=!1,l()}}}const aP=100;function lP(e,t,n){var h;let i;_h(e,Dr,p=>n(9,i=p));let{componentData:r}=t;const{data:s}=r;let o={},a;F5(W5,Cz((h=i==null?void 0:i.metadata)==null?void 0:h.pathspec,"stepname"));let l,u=!1;const c=()=>{n(2,u=!0),clearTimeout(l),l=setTimeout(()=>{n(2,u=!1)},aP)};function f(p){o=p,n(0,o)}function d(p){Xi[p?"unshift":"push"](()=>{a=p,n(1,a)})}return e.$$set=p=>{"componentData"in p&&n(5,r=p.componentData)},[o,a,u,s,c,r,f,d]}class J5 extends ve{constructor(t){super(),be(this,t,lP,oP,he,{componentData:5})}}function uP(e){var r;let t,n=(((r=e[0])==null?void 0:r.text)||"")+"",i;return{c(){t=H("h2"),i=Be(n),D(t,"class","title svelte-117s0ws"),D(t,"data-component","title")},m(s,o){z(s,t,o),X(t,i)},p(s,[o]){var a;o&1&&n!==(n=(((a=s[0])==null?void 0:a.text)||"")+"")&&pt(i,n)},i:re,o:re,d(s){s&&L(t)}}}function cP(e,t,n){let{componentData:i}=t;return e.$$set=r=>{"componentData"in r&&n(0,i=r.componentData)},[i]}class Q5 extends ve{constructor(t){super(),be(this,t,cP,uP,he,{componentData:0})}}function fP(e){var r;let t,n=(((r=e[0])==null?void 0:r.text)||"")+"",i;return{c(){t=H("p"),i=Be(n),D(t,"class","subtitle svelte-lu9pnn"),D(t,"data-component","subtitle")},m(s,o){z(s,t,o),X(t,i)},p(s,[o]){var a;o&1&&n!==(n=(((a=s[0])==null?void 0:a.text)||"")+"")&&pt(i,n)},i:re,o:re,d(s){s&&L(t)}}}function dP(e,t,n){let{componentData:i}=t;return e.$$set=r=>{"componentData"in r&&n(0,i=r.componentData)},[i]}class e6 extends ve{constructor(t){super(),be(this,t,dP,fP,he,{componentData:0})}}function t6(e){let t,n;return t=new Q5({props:{componentData:{type:"title",text:e[1]}}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&2&&(s.componentData={type:"title",text:i[1]}),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function n6(e){let t,n;return t=new e6({props:{componentData:{type:"subtitle",text:e[0]}}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.componentData={type:"subtitle",text:i[0]}),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function hP(e){let t,n,i,r=e[1]&&t6(e),s=e[0]&&n6(e);return{c(){t=H("header"),r&&r.c(),n=je(),s&&s.c(),D(t,"class","container svelte-1ugmt5d"),D(t,"data-component","heading")},m(o,a){z(o,t,a),r&&r.m(t,null),X(t,n),s&&s.m(t,null),i=!0},p(o,[a]){o[1]?r?(r.p(o,a),a&2&&F(r,1)):(r=t6(o),r.c(),F(r,1),r.m(t,n)):r&&($e(),N(r,1,1,()=>{r=null}),Ee()),o[0]?s?(s.p(o,a),a&1&&F(s,1)):(s=n6(o),s.c(),F(s,1),s.m(t,null)):s&&($e(),N(s,1,1,()=>{s=null}),Ee())},i(o){i||(F(r),F(s),i=!0)},o(o){N(r),N(s),i=!1},d(o){o&&L(t),r&&r.d(),s&&s.d()}}}function pP(e,t,n){let i,r,{componentData:s}=t;return e.$$set=o=>{"componentData"in o&&n(2,s=o.componentData)},e.$$.update=()=>{e.$$.dirty&4&&n(1,{title:i,subtitle:r}=s,i,(n(0,r),n(2,s)))},[r,i,s]}let i6=class extends ve{constructor(t){super(),be(this,t,pP,hP,he,{componentData:2})}};function r6(e){let t,n;return{c(){t=H("div"),n=Be(e[2]),D(t,"class","label svelte-1x96yvr")},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&4&&pt(n,i[2])},d(i){i&&L(t)}}}function s6(e){let t,n;return{c(){t=H("figcaption"),n=Be(e[1]),D(t,"class","description svelte-1x96yvr")},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&2&&pt(n,i[1])},d(i){i&&L(t)}}}function gP(e){let t,n,i,r,s,o,a,l,u,c=e[2]&&r6(e),f=e[1]&&s6(e);return{c(){t=H("figure"),n=H("div"),i=H("img"),o=je(),c&&c.c(),a=je(),f&&f.c(),xh(i.src,r=e[3])||D(i,"src",r),D(i,"alt",s=e[2]||"image"),D(i,"class","svelte-1x96yvr"),D(n,"class","imageContainer"),D(t,"data-component","image"),D(t,"class","svelte-1x96yvr")},m(d,h){z(d,t,h),X(t,n),X(n,i),X(t,o),c&&c.m(t,null),X(t,a),f&&f.m(t,null),l||(u=Il(t,"click",e[4]),l=!0)},p(d,[h]){h&8&&!xh(i.src,r=d[3])&&D(i,"src",r),h&4&&s!==(s=d[2]||"image")&&D(i,"alt",s),d[2]?c?c.p(d,h):(c=r6(d),c.c(),c.m(t,a)):c&&(c.d(1),c=null),d[1]?f?f.p(d,h):(f=s6(d),f.c(),f.m(t,null)):f&&(f.d(1),f=null)},i:re,o:re,d(d){d&&L(t),c&&c.d(),f&&f.d(),l=!1,u()}}}function mP(e,t,n){let i,r,s,{componentData:o}=t;const a=()=>Fc.set(o);return e.$$set=l=>{"componentData"in l&&n(0,o=l.componentData)},e.$$.update=()=>{e.$$.dirty&1&&n(3,{src:i,label:r,description:s}=o,i,(n(2,r),n(0,o)),(n(1,s),n(0,o)))},[o,s,r,i,a]}let o6=class extends ve{constructor(t){super(),be(this,t,mP,gP,he,{componentData:0})}};function yP(e){let t,n,i,r,s=e[0].data+"",o,a,l;return{c(){t=H("pre"),n=Be(`
|
|
2
|
+
`),i=H("code"),r=Be(`
|
|
3
|
+
`),o=Be(s),a=Be(`
|
|
4
|
+
`),l=Be(`
|
|
5
|
+
`),D(i,"class","mono language-log"),D(t,"class","log svelte-1jhmsu"),D(t,"data-component","log")},m(u,c){z(u,t,c),X(t,n),X(t,i),X(i,r),X(i,o),X(i,a),e[2](i),X(t,l)},p(u,[c]){c&1&&s!==(s=u[0].data+"")&&pt(o,s)},i:re,o:re,d(u){u&&L(t),e[2](null)}}}function bP(e,t,n){let{componentData:i}=t,r;function s(){var a;r&&((a=window==null?void 0:window.Prism)==null||a.highlightElement(r))}function o(a){Xi[a?"unshift":"push"](()=>{r=a,n(1,r)})}return e.$$set=a=>{"componentData"in a&&n(0,i=a.componentData)},e.$$.update=()=>{e.$$.dirty&2&&r&&s()},[i,r,o]}let a6=class extends ve{constructor(t){super(),be(this,t,bP,yP,he,{componentData:0})}};function vP(){const e=console.warn;console.warn=t=>{t.includes("unknown prop")||t.includes("unexpected slot")||e(t)},Mc(()=>{console.warn=e})}function l6(e,t,n){const i=e.slice();return i[18]=t[n],i}function u6(e,t,n){const i=e.slice();return i[18]=t[n],i}function c6(e,t,n){const i=e.slice();return i[10]=t[n],i}function f6(e,t,n){const i=e.slice();return i[13]=t[n],i[15]=n,i}function d6(e,t,n){const i=e.slice();return i[16]=t[n],i[15]=n,i}function h6(e,t,n){const i=e.slice();return i[7]=t[n],i}function xP(e){let t,n,i,r;const s=[$P,kP,wP],o=[];function a(l,u){return l[0]==="table"?0:l[0]==="list"?1:2}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,u){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function _P(e){let t,n,i=Oe(e[1]),r=[];for(let o=0;o<i.length;o+=1)r[o]=v6(h6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&34){i=Oe(o[1]);let l;for(l=0;l<i.length;l+=1){const u=h6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=v6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function wP(e){let t,n,i;const r=[e[6]];var s=e[5][e[0]];function o(a,l){let u={$$slots:{default:[SP]},$$scope:{ctx:a}};if(l!==void 0&&l&64)u=fi(r,[Yi(a[6])]);else for(let c=0;c<r.length;c+=1)u=Ge(u,r[c]);return{props:u}}return s&&(t=Ye(s,o(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(a,l){t&&le(t,a,l),z(a,n,l),i=!0},p(a,l){if(l&33&&s!==(s=a[5][a[0]])){if(t){$e();const u=t;N(u.$$.fragment,1,0,()=>{ue(u,1)}),Ee()}s?(t=Ye(s,o(a,l)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(s){const u=l&64?fi(r,[Yi(a[6])]):{};l&8388706&&(u.$$scope={dirty:l,ctx:a}),t.$set(u)}},i(a){i||(t&&F(t.$$.fragment,a),i=!0)},o(a){t&&N(t.$$.fragment,a),i=!1},d(a){a&&L(n),t&&ue(t,a)}}}function kP(e){let t,n,i,r;const s=[TP,AP],o=[];function a(l,u){return l[4]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,u){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function $P(e){let t,n,i;var r=e[5].table;function s(o,a){return{props:{$$slots:{default:[BP]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&32&&r!==(r=o[5].table)){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&8388716&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function EP(e){let t=e[6].raw+"",n;return{c(){n=Be(t)},m(i,r){z(i,n,r)},p(i,r){r&64&&t!==(t=i[6].raw+"")&&pt(n,t)},i:re,o:re,d(i){i&&L(n)}}}function CP(e){let t,n;return t=new fa({props:{tokens:e[1],renderers:e[5]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&2&&(s.tokens=i[1]),r&32&&(s.renderers=i[5]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function SP(e){let t,n,i,r;const s=[CP,EP],o=[];function a(l,u){return l[1]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,u){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function AP(e){let t,n,i;const r=[{ordered:e[4]},e[6]];var s=e[5].list;function o(a,l){let u={$$slots:{default:[FP]},$$scope:{ctx:a}};if(l!==void 0&&l&80)u=fi(r,[l&16&&{ordered:a[4]},l&64&&Yi(a[6])]);else for(let c=0;c<r.length;c+=1)u=Ge(u,r[c]);return{props:u}}return s&&(t=Ye(s,o(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(a,l){t&&le(t,a,l),z(a,n,l),i=!0},p(a,l){if(l&32&&s!==(s=a[5].list)){if(t){$e();const u=t;N(u.$$.fragment,1,0,()=>{ue(u,1)}),Ee()}s?(t=Ye(s,o(a,l)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(s){const u=l&80?fi(r,[l&16&&{ordered:a[4]},l&64&&Yi(a[6])]):{};l&8388704&&(u.$$scope={dirty:l,ctx:a}),t.$set(u)}},i(a){i||(t&&F(t.$$.fragment,a),i=!0)},o(a){t&&N(t.$$.fragment,a),i=!1},d(a){a&&L(n),t&&ue(t,a)}}}function TP(e){let t,n,i;const r=[{ordered:e[4]},e[6]];var s=e[5].list;function o(a,l){let u={$$slots:{default:[NP]},$$scope:{ctx:a}};if(l!==void 0&&l&80)u=fi(r,[l&16&&{ordered:a[4]},l&64&&Yi(a[6])]);else for(let c=0;c<r.length;c+=1)u=Ge(u,r[c]);return{props:u}}return s&&(t=Ye(s,o(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(a,l){t&&le(t,a,l),z(a,n,l),i=!0},p(a,l){if(l&32&&s!==(s=a[5].list)){if(t){$e();const u=t;N(u.$$.fragment,1,0,()=>{ue(u,1)}),Ee()}s?(t=Ye(s,o(a,l)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(s){const u=l&80?fi(r,[l&16&&{ordered:a[4]},l&64&&Yi(a[6])]):{};l&8388704&&(u.$$scope={dirty:l,ctx:a}),t.$set(u)}},i(a){i||(t&&F(t.$$.fragment,a),i=!0)},o(a){t&&N(t.$$.fragment,a),i=!1},d(a){a&&L(n),t&&ue(t,a)}}}function MP(e){let t,n,i;return t=new fa({props:{tokens:e[18].tokens,renderers:e[5]}}),{c(){ce(t.$$.fragment),n=je()},m(r,s){le(t,r,s),z(r,n,s),i=!0},p(r,s){const o={};s&64&&(o.tokens=r[18].tokens),s&32&&(o.renderers=r[5]),t.$set(o)},i(r){i||(F(t.$$.fragment,r),i=!0)},o(r){N(t.$$.fragment,r),i=!1},d(r){r&&L(n),ue(t,r)}}}function p6(e){let t,n,i;const r=[e[18]];var s=e[5].unorderedlistitem||e[5].listitem;function o(a,l){let u={$$slots:{default:[MP]},$$scope:{ctx:a}};if(l!==void 0&&l&64)u=fi(r,[Yi(a[18])]);else for(let c=0;c<r.length;c+=1)u=Ge(u,r[c]);return{props:u}}return s&&(t=Ye(s,o(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(a,l){t&&le(t,a,l),z(a,n,l),i=!0},p(a,l){if(l&32&&s!==(s=a[5].unorderedlistitem||a[5].listitem)){if(t){$e();const u=t;N(u.$$.fragment,1,0,()=>{ue(u,1)}),Ee()}s?(t=Ye(s,o(a,l)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(s){const u=l&64?fi(r,[Yi(a[18])]):{};l&8388704&&(u.$$scope={dirty:l,ctx:a}),t.$set(u)}},i(a){i||(t&&F(t.$$.fragment,a),i=!0)},o(a){t&&N(t.$$.fragment,a),i=!1},d(a){a&&L(n),t&&ue(t,a)}}}function FP(e){let t,n,i=Oe(e[6].items),r=[];for(let o=0;o<i.length;o+=1)r[o]=p6(l6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&96){i=Oe(o[6].items);let l;for(l=0;l<i.length;l+=1){const u=l6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=p6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function DP(e){let t,n,i;return t=new fa({props:{tokens:e[18].tokens,renderers:e[5]}}),{c(){ce(t.$$.fragment),n=je()},m(r,s){le(t,r,s),z(r,n,s),i=!0},p(r,s){const o={};s&64&&(o.tokens=r[18].tokens),s&32&&(o.renderers=r[5]),t.$set(o)},i(r){i||(F(t.$$.fragment,r),i=!0)},o(r){N(t.$$.fragment,r),i=!1},d(r){r&&L(n),ue(t,r)}}}function g6(e){let t,n,i;const r=[e[18]];var s=e[5].orderedlistitem||e[5].listitem;function o(a,l){let u={$$slots:{default:[DP]},$$scope:{ctx:a}};if(l!==void 0&&l&64)u=fi(r,[Yi(a[18])]);else for(let c=0;c<r.length;c+=1)u=Ge(u,r[c]);return{props:u}}return s&&(t=Ye(s,o(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(a,l){t&&le(t,a,l),z(a,n,l),i=!0},p(a,l){if(l&32&&s!==(s=a[5].orderedlistitem||a[5].listitem)){if(t){$e();const u=t;N(u.$$.fragment,1,0,()=>{ue(u,1)}),Ee()}s?(t=Ye(s,o(a,l)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(s){const u=l&64?fi(r,[Yi(a[18])]):{};l&8388704&&(u.$$scope={dirty:l,ctx:a}),t.$set(u)}},i(a){i||(t&&F(t.$$.fragment,a),i=!0)},o(a){t&&N(t.$$.fragment,a),i=!1},d(a){a&&L(n),t&&ue(t,a)}}}function NP(e){let t,n,i=Oe(e[6].items),r=[];for(let o=0;o<i.length;o+=1)r[o]=g6(u6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&96){i=Oe(o[6].items);let l;for(l=0;l<i.length;l+=1){const u=u6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=g6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function OP(e){let t,n,i;return t=new fa({props:{tokens:e[16].tokens,renderers:e[5]}}),{c(){ce(t.$$.fragment),n=je()},m(r,s){le(t,r,s),z(r,n,s),i=!0},p(r,s){const o={};s&4&&(o.tokens=r[16].tokens),s&32&&(o.renderers=r[5]),t.$set(o)},i(r){i||(F(t.$$.fragment,r),i=!0)},o(r){N(t.$$.fragment,r),i=!1},d(r){r&&L(n),ue(t,r)}}}function m6(e){let t,n,i;var r=e[5].tablecell;function s(o,a){return{props:{header:!0,align:o[6].align[o[15]]||"center",$$slots:{default:[OP]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&32&&r!==(r=o[5].tablecell)){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&64&&(l.align=o[6].align[o[15]]||"center"),a&8388644&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function RP(e){let t,n,i=Oe(e[2]),r=[];for(let o=0;o<i.length;o+=1)r[o]=m6(d6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&100){i=Oe(o[2]);let l;for(l=0;l<i.length;l+=1){const u=d6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=m6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function LP(e){let t,n,i;var r=e[5].tablerow;function s(o,a){return{props:{$$slots:{default:[RP]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&32&&r!==(r=o[5].tablerow)){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&8388708&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function IP(e){let t,n;return t=new fa({props:{tokens:e[13].tokens,renderers:e[5]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&8&&(s.tokens=i[13].tokens),r&32&&(s.renderers=i[5]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function y6(e){let t,n,i;var r=e[5].tablecell;function s(o,a){return{props:{header:!1,align:o[6].align[o[15]]||"center",$$slots:{default:[IP]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&32&&r!==(r=o[5].tablecell)){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&64&&(l.align=o[6].align[o[15]]||"center"),a&8388648&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function zP(e){let t,n,i=Oe(e[10]),r=[];for(let o=0;o<i.length;o+=1)r[o]=y6(f6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=je()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&104){i=Oe(o[10]);let l;for(l=0;l<i.length;l+=1){const u=f6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=y6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function b6(e){let t,n,i;var r=e[5].tablerow;function s(o,a){return{props:{$$slots:{default:[zP]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&32&&r!==(r=o[5].tablerow)){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&8388712&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function PP(e){let t,n,i=Oe(e[3]),r=[];for(let o=0;o<i.length;o+=1)r[o]=b6(c6(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&104){i=Oe(o[3]);let l;for(l=0;l<i.length;l+=1){const u=c6(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=b6(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function BP(e){let t,n,i,r,s;var o=e[5].tablehead;function a(c,f){return{props:{$$slots:{default:[LP]},$$scope:{ctx:c}}}}o&&(t=Ye(o,a(e)));var l=e[5].tablebody;function u(c,f){return{props:{$$slots:{default:[PP]},$$scope:{ctx:c}}}}return l&&(i=Ye(l,u(e))),{c(){t&&ce(t.$$.fragment),n=je(),i&&ce(i.$$.fragment),r=Ae()},m(c,f){t&&le(t,c,f),z(c,n,f),i&&le(i,c,f),z(c,r,f),s=!0},p(c,f){if(f&32&&o!==(o=c[5].tablehead)){if(t){$e();const d=t;N(d.$$.fragment,1,0,()=>{ue(d,1)}),Ee()}o?(t=Ye(o,a(c)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(o){const d={};f&8388708&&(d.$$scope={dirty:f,ctx:c}),t.$set(d)}if(f&32&&l!==(l=c[5].tablebody)){if(i){$e();const d=i;N(d.$$.fragment,1,0,()=>{ue(d,1)}),Ee()}l?(i=Ye(l,u(c)),ce(i.$$.fragment),F(i.$$.fragment,1),le(i,r.parentNode,r)):i=null}else if(l){const d={};f&8388712&&(d.$$scope={dirty:f,ctx:c}),i.$set(d)}},i(c){s||(t&&F(t.$$.fragment,c),i&&F(i.$$.fragment,c),s=!0)},o(c){t&&N(t.$$.fragment,c),i&&N(i.$$.fragment,c),s=!1},d(c){c&&(L(n),L(r)),t&&ue(t,c),i&&ue(i,c)}}}function v6(e){let t,n;const i=[e[7],{renderers:e[5]}];let r={};for(let s=0;s<i.length;s+=1)r=Ge(r,i[s]);return t=new fa({props:r}),{c(){ce(t.$$.fragment)},m(s,o){le(t,s,o),n=!0},p(s,o){const a=o&34?fi(i,[o&2&&Yi(s[7]),o&32&&{renderers:s[5]}]):{};t.$set(a)},i(s){n||(F(t.$$.fragment,s),n=!0)},o(s){N(t.$$.fragment,s),n=!1},d(s){ue(t,s)}}}function jP(e){let t,n,i,r;const s=[_P,xP],o=[];function a(l,u){return l[0]?l[5][l[0]]?1:-1:0}return~(t=a(e))&&(n=o[t]=s[t](e)),{c(){n&&n.c(),i=Ae()},m(l,u){~t&&o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?~t&&o[t].p(l,u):(n&&($e(),N(o[c],1,1,()=>{o[c]=null}),Ee()),~t?(n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i)):n=null)},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),~t&&o[t].d(l)}}}function UP(e,t,n){const i=["type","tokens","header","rows","ordered","renderers"];let r=S5(t,i),{type:s=void 0}=t,{tokens:o=void 0}=t,{header:a=void 0}=t,{rows:l=void 0}=t,{ordered:u=!1}=t,{renderers:c}=t;return vP(),e.$$set=f=>{t=Ge(Ge({},t),Pm(f)),n(6,r=S5(t,i)),"type"in f&&n(0,s=f.type),"tokens"in f&&n(1,o=f.tokens),"header"in f&&n(2,a=f.header),"rows"in f&&n(3,l=f.rows),"ordered"in f&&n(4,u=f.ordered),"renderers"in f&&n(5,c=f.renderers)},[s,o,a,l,u,c,r]}let fa=class extends ve{constructor(t){super(),be(this,t,UP,jP,he,{type:0,tokens:1,header:2,rows:3,ordered:4,renderers:5})}};function Xm(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let no=Xm();function x6(e){no=e}const _6=/[&<>"']/,qP=new RegExp(_6.source,"g"),w6=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,WP=new RegExp(w6.source,"g"),HP={"&":"&","<":"<",">":">",'"':""","'":"'"},k6=e=>HP[e];function cn(e,t){if(t){if(_6.test(e))return e.replace(qP,k6)}else if(w6.test(e))return e.replace(WP,k6);return e}const GP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function $6(e){return e.replace(GP,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const VP=/(^|[^\[])\^/g;function tt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(i,r)=>(r=r.source||r,r=r.replace(VP,"$1"),e=e.replace(i,r),n),getRegex:()=>new RegExp(e,t)};return n}const XP=/[^\w:]/g,YP=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E6(e,t,n){if(e){let i;try{i=decodeURIComponent($6(n)).replace(XP,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}t&&!YP.test(n)&&(n=QP(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const kh={},ZP=/^[^:]+:\/*[^/]*$/,KP=/^([^:]+:)[\s\S]*$/,JP=/^([^:]+:\/*[^/]*)[\s\S]*$/;function QP(e,t){kh[" "+e]||(ZP.test(e)?kh[" "+e]=e+"/":kh[" "+e]=Eh(e,"/",!0)),e=kh[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(KP,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(JP,"$1")+t:e+t}const $h={exec:function(){}};function C6(e,t){const n=e.replace(/\|/g,(s,o,a)=>{let l=!1,u=o;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),i=n.split(/ \|/);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(/\\\|/g,"|");return i}function Eh(e,t,n){const i=e.length;if(i===0)return"";let r=0;for(;r<i;){const s=e.charAt(i-r-1);if(s===t&&!n)r++;else if(s!==t&&n)r++;else break}return e.slice(0,i-r)}function eB(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let i=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return-1}function tB(e,t){!e||e.silent||(t&&console.warn("marked(): callback is deprecated since version 5.0.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/using_pro#async"),(e.sanitize||e.sanitizer)&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),(e.highlight||e.langPrefix!=="language-")&&console.warn("marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight."),e.mangle&&console.warn("marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`."),e.baseUrl&&console.warn("marked(): baseUrl parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-base-url."),e.smartypants&&console.warn("marked(): smartypants parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-smartypants."),e.xhtml&&console.warn("marked(): xhtml parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-xhtml."),(e.headerIds||e.headerPrefix)&&console.warn("marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`."))}function S6(e,t,n,i){const r=t.href,s=t.title?cn(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){i.state.inLink=!0;const a={type:"link",raw:n,href:r,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,a}return{type:"image",raw:n,href:r,title:s,text:cn(o)}}function nB(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const i=n[1];return t.split(`
|
|
6
|
+
`).map(r=>{const s=r.match(/^\s+/);if(s===null)return r;const[o]=s;return o.length>=i.length?r.slice(i.length):r}).join(`
|
|
7
|
+
`)}class Ch{constructor(t){this.options=t||no}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const i=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Eh(i,`
|
|
8
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const i=n[0],r=nB(i,n[3]||"");return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(/#$/.test(i)){const r=Eh(i,"#");(this.options.pedantic||!r||/ $/.test(r))&&(i=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const i=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(i);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:s,text:i}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i,r,s,o,a,l,u,c,f,d,h,p,g=n[1].trim();const m=g.length>1,y={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const b=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(p=!1,!(!(n=b.exec(t))||this.rules.block.hr.test(t)));){if(i=n[0],t=t.substring(i.length),c=n[2].split(`
|
|
9
|
+
`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),f=t.split(`
|
|
10
|
+
`,1)[0],this.options.pedantic?(o=2,h=c.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,h=c.slice(o),o+=n[1].length),l=!1,!c&&/^ *$/.test(f)&&(i+=f+`
|
|
11
|
+
`,t=t.substring(f.length+1),p=!0),!p){const x=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),_=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;t&&(d=t.split(`
|
|
12
|
+
`,1)[0],f=d,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(k.test(f)||w.test(f)||x.test(f)||_.test(t)));){if(f.search(/[^ ]/)>=o||!f.trim())h+=`
|
|
13
|
+
`+f.slice(o);else{if(l||c.search(/[^ ]/)>=4||k.test(c)||w.test(c)||_.test(c))break;h+=`
|
|
14
|
+
`+f}!l&&!f.trim()&&(l=!0),i+=d+`
|
|
15
|
+
`,t=t.substring(d.length+1),c=f.slice(o)}}y.loose||(u?y.loose=!0:/\n *\n *$/.test(i)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(h),r&&(s=r[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:i,task:!!r,checked:s,loose:!1,text:h}),y.raw+=i}y.items[y.items.length-1].raw=i.trimRight(),y.items[y.items.length-1].text=h.trimRight(),y.raw=y.raw.trimRight();const v=y.items.length;for(a=0;a<v;a++)if(this.lexer.state.top=!1,y.items[a].tokens=this.lexer.blockTokens(y.items[a].text,[]),!y.loose){const x=y.items[a].tokens.filter(k=>k.type==="space"),_=x.length>0&&x.some(k=>/\n.*\n/.test(k.raw));y.loose=_}if(y.loose)for(a=0;a<v;a++)y.items[a].loose=!0;return y}}html(t){const n=this.rules.block.html.exec(t);if(n){const i={type:"html",block:!0,raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const r=this.options.sanitizer?this.options.sanitizer(n[0]):cn(n[0]);i.type="paragraph",i.text=r,i.tokens=this.lexer.inline(r)}return i}}def(t){const n=this.rules.block.def.exec(t);if(n){const i=n[1].toLowerCase().replace(/\s+/g," "),r=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:r,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const i={type:"table",header:C6(n[1]).map(r=>({text:r})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
16
|
+
`):[]};if(i.header.length===i.align.length){i.raw=n[0];let r=i.align.length,s,o,a,l;for(s=0;s<r;s++)/^ *-+: *$/.test(i.align[s])?i.align[s]="right":/^ *:-+: *$/.test(i.align[s])?i.align[s]="center":/^ *:-+ *$/.test(i.align[s])?i.align[s]="left":i.align[s]=null;for(r=i.rows.length,s=0;s<r;s++)i.rows[s]=C6(i.rows[s],i.header.length).map(u=>({text:u}));for(r=i.header.length,o=0;o<r;o++)i.header[o].tokens=this.lexer.inline(i.header[o].text);for(r=i.rows.length,o=0;o<r;o++)for(l=i.rows[o],a=0;a<l.length;a++)l[a].tokens=this.lexer.inline(l[a].text);return i}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const i=n[1].charAt(n[1].length-1)===`
|
|
17
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:cn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):cn(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const i=n[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const o=Eh(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=eB(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let r=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);o&&(r=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(i)?r=r.slice(1):r=r.slice(1,-1)),S6(n,{href:r&&r.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let r=(i[2]||i[1]).replace(/\s+/g," ");if(r=n[r.toLowerCase()],!r){const s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return S6(i,r,i[0],this.lexer)}}emStrong(t,n,i=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r||r[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=r[0].length-1;let a,l,u=o,c=0;const f=r[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(f.lastIndex=0,n=n.slice(-1*t.length+o);(r=f.exec(n))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=a.length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);const d=t.slice(0,o+r.index+l+1);if(Math.min(o,l)%2){const p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}const h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(/\n/g," ");const r=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return r&&s&&(i=i.substring(1,i.length-1)),i=cn(i,!0),{type:"codespan",raw:n[0],text:i}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const i=this.rules.inline.autolink.exec(t);if(i){let r,s;return i[2]==="@"?(r=cn(this.options.mangle?n(i[1]):i[1]),s="mailto:"+r):(r=cn(i[1]),s=r),{type:"link",raw:i[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t,n){let i;if(i=this.rules.inline.url.exec(t)){let r,s;if(i[2]==="@")r=cn(this.options.mangle?n(i[0]):i[0]),s="mailto:"+r;else{let o;do o=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0];while(o!==i[0]);r=cn(i[0]),i[1]==="www."?s="http://"+i[0]:s=i[0]}return{type:"link",raw:i[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t,n){const i=this.rules.inline.text.exec(t);if(i){let r;return this.lexer.state.inRawBlock?r=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):cn(i[0]):i[0]:r=cn(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}}const xe={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:$h,lheading:/^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};xe._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,xe.def=tt(xe.def).replace("label",xe._label).replace("title",xe._title).getRegex(),xe.bullet=/(?:[*+-]|\d{1,9}[.)])/,xe.listItemStart=tt(/^( *)(bull) */).replace("bull",xe.bullet).getRegex(),xe.list=tt(xe.list).replace(/bull/g,xe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xe.def.source+")").getRegex(),xe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,xe.html=tt(xe.html,"i").replace("comment",xe._comment).replace("tag",xe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xe.lheading=tt(xe.lheading).replace(/bull/g,xe.bullet).getRegex(),xe.paragraph=tt(xe._paragraph).replace("hr",xe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe._tag).getRegex(),xe.blockquote=tt(xe.blockquote).replace("paragraph",xe.paragraph).getRegex(),xe.normal={...xe},xe.gfm={...xe.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},xe.gfm.table=tt(xe.gfm.table).replace("hr",xe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe._tag).getRegex(),xe.gfm.paragraph=tt(xe._paragraph).replace("hr",xe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",xe.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe._tag).getRegex(),xe.pedantic={...xe.normal,html:tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$h,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tt(xe.normal._paragraph).replace("hr",xe.hr).replace("heading",` *#{1,6} *[^
|
|
18
|
+
]`).replace("lheading",xe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:$h,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:$h,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};oe._punctuation="\\p{P}$+<=>`^|~",oe.punctuation=tt(oe.punctuation,"u").replace(/punctuation/g,oe._punctuation).getRegex(),oe.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,oe.anyPunctuation=/\\[punct]/g,oe._escapes=/\\([punct])/g,oe._comment=tt(xe._comment).replace("(?:-->|$)","-->").getRegex(),oe.emStrong.lDelim=tt(oe.emStrong.lDelim,"u").replace(/punct/g,oe._punctuation).getRegex(),oe.emStrong.rDelimAst=tt(oe.emStrong.rDelimAst,"gu").replace(/punct/g,oe._punctuation).getRegex(),oe.emStrong.rDelimUnd=tt(oe.emStrong.rDelimUnd,"gu").replace(/punct/g,oe._punctuation).getRegex(),oe.anyPunctuation=tt(oe.anyPunctuation,"gu").replace(/punct/g,oe._punctuation).getRegex(),oe._escapes=tt(oe._escapes,"gu").replace(/punct/g,oe._punctuation).getRegex(),oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,oe.autolink=tt(oe.autolink).replace("scheme",oe._scheme).replace("email",oe._email).getRegex(),oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oe.tag=tt(oe.tag).replace("comment",oe._comment).replace("attribute",oe._attribute).getRegex(),oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oe.link=tt(oe.link).replace("label",oe._label).replace("href",oe._href).replace("title",oe._title).getRegex(),oe.reflink=tt(oe.reflink).replace("label",oe._label).replace("ref",xe._label).getRegex(),oe.nolink=tt(oe.nolink).replace("ref",xe._label).getRegex(),oe.reflinkSearch=tt(oe.reflinkSearch,"g").replace("reflink",oe.reflink).replace("nolink",oe.nolink).getRegex(),oe.normal={...oe},oe.pedantic={...oe.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:tt(/^!?\[(label)\]\((.*?)\)/).replace("label",oe._label).getRegex(),reflink:tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe._label).getRegex()},oe.gfm={...oe.normal,escape:tt(oe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oe.gfm.url=tt(oe.gfm.url,"i").replace("email",oe.gfm._extended_email).getRegex(),oe.breaks={...oe.gfm,br:tt(oe.br).replace("{2,}","*").getRegex(),text:tt(oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function iB(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function A6(e){let t="",n,i;const r=e.length;for(n=0;n<r;n++)i=e.charCodeAt(n),Math.random()>.5&&(i="x"+i.toString(16)),t+="&#"+i+";";return t}class Zi{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||no,this.options.tokenizer=this.options.tokenizer||new Ch,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:xe.normal,inline:oe.normal};this.options.pedantic?(n.block=xe.pedantic,n.inline=oe.pedantic):this.options.gfm&&(n.block=xe.gfm,this.options.breaks?n.inline=oe.breaks:n.inline=oe.gfm),this.tokenizer.rules=n}static get rules(){return{block:xe,inline:oe}}static lex(t,n){return new Zi(n).lex(t)}static lexInline(t,n){return new Zi(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
19
|
+
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,u)=>l+" ".repeat(u.length));let i,r,s,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(i=a.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
20
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
21
|
+
`+i.raw,r.text+=`
|
|
22
|
+
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
23
|
+
`+i.raw,r.text+=`
|
|
24
|
+
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){r=n[n.length-1],o&&r.type==="paragraph"?(r.raw+=`
|
|
25
|
+
`+i.raw,r.text+=`
|
|
26
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i),o=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&r.type==="text"?(r.raw+=`
|
|
27
|
+
`+i.raw,r.text+=`
|
|
28
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let i,r,s,o=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(i=c.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.escape(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.tag(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.link(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.emStrong(t,o,u)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.codespan(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.br(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.del(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.autolink(t,A6)){t=t.substring(i.raw.length),n.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(t,A6))){t=t.substring(i.raw.length),n.push(i);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const f=t.slice(1);let d;this.options.extensions.startInline.forEach(function(h){d=h.call({lexer:this},f),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(s=t.substring(0,c+1))}if(i=this.tokenizer.inlineText(s,iB)){t=t.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(u=i.raw.slice(-1)),l=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}let Sh=class{constructor(t){this.options=t||no}code(t,n,i){const r=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,r);s!=null&&s!==t&&(i=!0,t=s)}return t=t.replace(/\n$/,"")+`
|
|
29
|
+
`,r?'<pre><code class="'+this.options.langPrefix+cn(r)+'">'+(i?t:cn(t,!0))+`</code></pre>
|
|
30
|
+
`:"<pre><code>"+(i?t:cn(t,!0))+`</code></pre>
|
|
31
|
+
`}blockquote(t){return`<blockquote>
|
|
32
|
+
${t}</blockquote>
|
|
33
|
+
`}html(t,n){return t}heading(t,n,i,r){if(this.options.headerIds){const s=this.options.headerPrefix+r.slug(i);return`<h${n} id="${s}">${t}</h${n}>
|
|
34
|
+
`}return`<h${n}>${t}</h${n}>
|
|
35
|
+
`}hr(){return this.options.xhtml?`<hr/>
|
|
36
|
+
`:`<hr>
|
|
37
|
+
`}list(t,n,i){const r=n?"ol":"ul",s=n&&i!==1?' start="'+i+'"':"";return"<"+r+s+`>
|
|
38
|
+
`+t+"</"+r+`>
|
|
39
|
+
`}listitem(t){return`<li>${t}</li>
|
|
40
|
+
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
|
|
41
|
+
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
42
|
+
<thead>
|
|
43
|
+
`+t+`</thead>
|
|
44
|
+
`+n+`</table>
|
|
45
|
+
`}tablerow(t){return`<tr>
|
|
46
|
+
${t}</tr>
|
|
47
|
+
`}tablecell(t,n){const i=n.header?"th":"td";return(n.align?`<${i} align="${n.align}">`:`<${i}>`)+t+`</${i}>
|
|
48
|
+
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,i){if(t=E6(this.options.sanitize,this.options.baseUrl,t),t===null)return i;let r='<a href="'+t+'"';return n&&(r+=' title="'+n+'"'),r+=">"+i+"</a>",r}image(t,n,i){if(t=E6(this.options.sanitize,this.options.baseUrl,t),t===null)return i;let r=`<img src="${t}" alt="${i}"`;return n&&(r+=` title="${n}"`),r+=this.options.xhtml?"/>":">",r}text(t){return t}};class Ym{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,i){return""+i}image(t,n,i){return""+i}br(){return""}}class Ah{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let i=t,r=0;if(this.seen.hasOwnProperty(i)){r=this.seen[t];do r++,i=t+"-"+r;while(this.seen.hasOwnProperty(i))}return n||(this.seen[t]=r,this.seen[i]=0),i}slug(t,n={}){const i=this.serialize(t);return this.getNextSafeSlug(i,n.dryrun)}}class Nr{constructor(t){this.options=t||no,this.options.renderer=this.options.renderer||new Sh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ym,this.slugger=new Ah}static parse(t,n){return new Nr(n).parse(t)}static parseInline(t,n){return new Nr(n).parseInline(t)}parse(t,n=!0){let i="",r,s,o,a,l,u,c,f,d,h,p,g,m,y,b,v,x,_,k;const w=t.length;for(r=0;r<w;r++){if(h=t[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(k=this.options.extensions.renderers[h.type].call({parser:this},h),k!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){i+=k||"";continue}switch(h.type){case"space":continue;case"hr":{i+=this.renderer.hr();continue}case"heading":{i+=this.renderer.heading(this.parseInline(h.tokens),h.depth,$6(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{i+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(f="",c="",a=h.header.length,s=0;s<a;s++)c+=this.renderer.tablecell(this.parseInline(h.header[s].tokens),{header:!0,align:h.align[s]});for(f+=this.renderer.tablerow(c),d="",a=h.rows.length,s=0;s<a;s++){for(u=h.rows[s],c="",l=u.length,o=0;o<l;o++)c+=this.renderer.tablecell(this.parseInline(u[o].tokens),{header:!1,align:h.align[o]});d+=this.renderer.tablerow(c)}i+=this.renderer.table(f,d);continue}case"blockquote":{d=this.parse(h.tokens),i+=this.renderer.blockquote(d);continue}case"list":{for(p=h.ordered,g=h.start,m=h.loose,a=h.items.length,d="",s=0;s<a;s++)b=h.items[s],v=b.checked,x=b.task,y="",b.task&&(_=this.renderer.checkbox(v),m?b.tokens.length>0&&b.tokens[0].type==="paragraph"?(b.tokens[0].text=_+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&b.tokens[0].tokens[0].type==="text"&&(b.tokens[0].tokens[0].text=_+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:_}):y+=_),y+=this.parse(b.tokens,m),d+=this.renderer.listitem(y,x,v);i+=this.renderer.list(d,p,g);continue}case"html":{i+=this.renderer.html(h.text,h.block);continue}case"paragraph":{i+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(d=h.tokens?this.parseInline(h.tokens):h.text;r+1<w&&t[r+1].type==="text";)h=t[++r],d+=`
|
|
49
|
+
`+(h.tokens?this.parseInline(h.tokens):h.text);i+=n?this.renderer.paragraph(d):d;continue}default:{const $='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error($);return}else throw new Error($)}}}return i}parseInline(t,n){n=n||this.renderer;let i="",r,s,o;const a=t.length;for(r=0;r<a;r++){if(s=t[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){i+=o||"";continue}switch(s.type){case"escape":{i+=n.text(s.text);break}case"html":{i+=n.html(s.text);break}case"link":{i+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{i+=n.image(s.href,s.title,s.text);break}case"strong":{i+=n.strong(this.parseInline(s.tokens,n));break}case"em":{i+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{i+=n.codespan(s.text);break}case"br":{i+=n.br();break}case"del":{i+=n.del(this.parseInline(s.tokens,n));break}case"text":{i+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return i}}class Dc{constructor(t){this.options=t||no}preprocess(t){return t}postprocess(t){return t}}Tt(Dc,"passThroughHooks",new Set(["preprocess","postprocess"]));class rB{constructor(...t){w5(this,bh);w5(this,Im);Tt(this,"defaults",Xm());Tt(this,"options",this.setOptions);Tt(this,"parse",zm(this,bh,k5).call(this,Zi.lex,Nr.parse));Tt(this,"parseInline",zm(this,bh,k5).call(this,Zi.lexInline,Nr.parseInline));Tt(this,"Parser",Nr);Tt(this,"parser",Nr.parse);Tt(this,"Renderer",Sh);Tt(this,"TextRenderer",Ym);Tt(this,"Lexer",Zi);Tt(this,"lexer",Zi.lex);Tt(this,"Tokenizer",Ch);Tt(this,"Slugger",Ah);Tt(this,"Hooks",Dc);this.use(...t)}walkTokens(t,n){let i=[];for(const r of t)switch(i=i.concat(n.call(this,r)),r.type){case"table":{for(const s of r.header)i=i.concat(this.walkTokens(s.tokens,n));for(const s of r.rows)for(const o of s)i=i.concat(this.walkTokens(o.tokens,n));break}case"list":{i=i.concat(this.walkTokens(r.items,n));break}default:this.defaults.extensions&&this.defaults.extensions.childTokens&&this.defaults.extensions.childTokens[r.type]?this.defaults.extensions.childTokens[r.type].forEach(s=>{i=i.concat(this.walkTokens(r[s],n))}):r.tokens&&(i=i.concat(this.walkTokens(r.tokens,n)))}return i}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const r={...i};if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[s.level]?n[s.level].unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),r.extensions=n),i.renderer){const s=this.defaults.renderer||new Sh(this.defaults);for(const o in i.renderer){const a=s[o];s[o]=(...l)=>{let u=i.renderer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}r.renderer=s}if(i.tokenizer){const s=this.defaults.tokenizer||new Ch(this.defaults);for(const o in i.tokenizer){const a=s[o];s[o]=(...l)=>{let u=i.tokenizer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}r.tokenizer=s}if(i.hooks){const s=this.defaults.hooks||new Dc;for(const o in i.hooks){const a=s[o];Dc.passThroughHooks.has(o)?s[o]=l=>{if(this.defaults.async)return Promise.resolve(i.hooks[o].call(s,l)).then(c=>a.call(s,c));const u=i.hooks[o].call(s,l);return a.call(s,u)}:s[o]=(...l)=>{let u=i.hooks[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}r.hooks=s}if(i.walkTokens){const s=this.defaults.walkTokens;r.walkTokens=function(o){let a=[];return a.push(i.walkTokens.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}bh=new WeakSet,k5=function(t,n){return(i,r,s)=>{typeof r=="function"&&(s=r,r=null);const o={...r};r={...this.defaults,...o};const a=zm(this,Im,lz).call(this,r.silent,r.async,s);if(typeof i>"u"||i===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(tB(r,s),r.hooks&&(r.hooks.options=r),s){const l=r.highlight;let u;try{r.hooks&&(i=r.hooks.preprocess(i)),u=t(i,r)}catch(d){return a(d)}const c=d=>{let h;if(!d)try{r.walkTokens&&this.walkTokens(u,r.walkTokens),h=n(u,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(p){d=p}return r.highlight=l,d?a(d):s(null,h)};if(!l||l.length<3||(delete r.highlight,!u.length))return c();let f=0;this.walkTokens(u,d=>{d.type==="code"&&(f++,setTimeout(()=>{l(d.text,d.lang,(h,p)=>{if(h)return c(h);p!=null&&p!==d.text&&(d.text=p,d.escaped=!0),f--,f===0&&c()})},0))}),f===0&&c();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(i):i).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(this.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>n(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(a);try{r.hooks&&(i=r.hooks.preprocess(i));const l=t(i,r);r.walkTokens&&this.walkTokens(l,r.walkTokens);let u=n(l,r);return r.hooks&&(u=r.hooks.postprocess(u)),u}catch(l){return a(l)}}},Im=new WeakSet,lz=function(t,n,i){return r=>{if(r.message+=`
|
|
50
|
+
Please report this to https://github.com/markedjs/marked.`,t){const s="<p>An error occurred:</p><pre>"+cn(r.message+"",!0)+"</pre>";if(n)return Promise.resolve(s);if(i){i(null,s);return}return s}if(n)return Promise.reject(r);if(i){i(r);return}throw r}};const da=new rB(no);function rt(e,t,n){return da.parse(e,t,n)}rt.options=rt.setOptions=function(e){return da.setOptions(e),rt.defaults=da.defaults,x6(rt.defaults),rt},rt.getDefaults=Xm,rt.defaults=no,rt.use=function(...e){return da.use(...e),rt.defaults=da.defaults,x6(rt.defaults),rt},rt.walkTokens=function(e,t){return da.walkTokens(e,t)},rt.parseInline=da.parseInline,rt.Parser=Nr,rt.parser=Nr.parse,rt.Renderer=Sh,rt.TextRenderer=Ym,rt.Lexer=Zi,rt.lexer=Zi.lex,rt.Tokenizer=Ch,rt.Slugger=Ah,rt.Hooks=Dc,rt.parse=rt,rt.options,rt.setOptions,rt.use,rt.walkTokens,rt.parseInline,Nr.parse,Zi.lex;const T6={};function sB(e){let t;return{c(){t=Be(e[1])},m(n,i){z(n,t,i)},p(n,i){i&2&&pt(t,n[1])},i:re,o:re,d(n){n&&L(t)}}}function oB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h6"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function aB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h5"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function lB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h4"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function uB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h3"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function cB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h2"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function fB(e){let t,n;const i=e[5].default,r=ct(i,e,e[4],null);return{c(){t=H("h1"),r&&r.c(),D(t,"id",e[2])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&16)&&dt(r,i,s,s[4],n?ft(i,s[4],o,null):ht(s[4]),null),(!n||o&4)&&D(t,"id",s[2])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function dB(e){let t,n,i,r;const s=[fB,cB,uB,lB,aB,oB,sB],o=[];function a(l,u){return l[0]===1?0:l[0]===2?1:l[0]===3?2:l[0]===4?3:l[0]===5?4:l[0]===6?5:6}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function hB(e,t,n){let i,{$$slots:r={},$$scope:s}=t,{depth:o}=t,{raw:a}=t,{text:l}=t;const{slug:u,getOptions:c}=D5(T6),f=c();return e.$$set=d=>{"depth"in d&&n(0,o=d.depth),"raw"in d&&n(1,a=d.raw),"text"in d&&n(3,l=d.text),"$$scope"in d&&n(4,s=d.$$scope)},e.$$.update=()=>{e.$$.dirty&8&&n(2,i=f.headerIds?f.headerPrefix+u(l):void 0)},[o,a,i,l,s,r]}class pB extends ve{constructor(t){super(),be(this,t,hB,dB,he,{depth:0,raw:1,text:3})}}function gB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("p"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function mB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class yB extends ve{constructor(t){super(),be(this,t,mB,gB,he,{})}}function bB(e){let t;const n=e[3].default,i=ct(n,e,e[2],null);return{c(){i&&i.c()},m(r,s){i&&i.m(r,s),t=!0},p(r,[s]){i&&i.p&&(!t||s&4)&&dt(i,n,r,r[2],t?ft(n,r[2],s,null):ht(r[2]),null)},i(r){t||(F(i,r),t=!0)},o(r){N(i,r),t=!1},d(r){i&&i.d(r)}}}function vB(e,t,n){let{$$slots:i={},$$scope:r}=t,{text:s}=t,{raw:o}=t;return e.$$set=a=>{"text"in a&&n(0,s=a.text),"raw"in a&&n(1,o=a.raw),"$$scope"in a&&n(2,r=a.$$scope)},[s,o,r,i]}let xB=class extends ve{constructor(t){super(),be(this,t,vB,bB,he,{text:0,raw:1})}};function _B(e){let t,n;return{c(){t=H("img"),xh(t.src,n=e[0])||D(t,"src",n),D(t,"title",e[1]),D(t,"alt",e[2])},m(i,r){z(i,t,r)},p(i,[r]){r&1&&!xh(t.src,n=i[0])&&D(t,"src",n),r&2&&D(t,"title",i[1]),r&4&&D(t,"alt",i[2])},i:re,o:re,d(i){i&&L(t)}}}function wB(e,t,n){let{href:i=""}=t,{title:r=void 0}=t,{text:s=""}=t;return e.$$set=o=>{"href"in o&&n(0,i=o.href),"title"in o&&n(1,r=o.title),"text"in o&&n(2,s=o.text)},[i,r,s]}let kB=class extends ve{constructor(t){super(),be(this,t,wB,_B,he,{href:0,title:1,text:2})}};function $B(e){let t,n;const i=e[3].default,r=ct(i,e,e[2],null);return{c(){t=H("a"),r&&r.c(),D(t,"href",e[0]),D(t,"title",e[1])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&4)&&dt(r,i,s,s[2],n?ft(i,s[2],o,null):ht(s[2]),null),(!n||o&1)&&D(t,"href",s[0]),(!n||o&2)&&D(t,"title",s[1])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function EB(e,t,n){let{$$slots:i={},$$scope:r}=t,{href:s=""}=t,{title:o=void 0}=t;return e.$$set=a=>{"href"in a&&n(0,s=a.href),"title"in a&&n(1,o=a.title),"$$scope"in a&&n(2,r=a.$$scope)},[s,o,r,i]}class CB extends ve{constructor(t){super(),be(this,t,EB,$B,he,{href:0,title:1})}}function SB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("em"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function AB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class TB extends ve{constructor(t){super(),be(this,t,AB,SB,he,{})}}function MB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("del"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function FB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class DB extends ve{constructor(t){super(),be(this,t,FB,MB,he,{})}}function NB(e){let t,n=e[0].replace(/`/g,"")+"",i;return{c(){t=H("code"),i=Be(n)},m(r,s){z(r,t,s),X(t,i)},p(r,[s]){s&1&&n!==(n=r[0].replace(/`/g,"")+"")&&pt(i,n)},i:re,o:re,d(r){r&&L(t)}}}function OB(e,t,n){let{raw:i}=t;return e.$$set=r=>{"raw"in r&&n(0,i=r.raw)},[i]}class RB extends ve{constructor(t){super(),be(this,t,OB,NB,he,{raw:0})}}function LB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("strong"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function IB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class zB extends ve{constructor(t){super(),be(this,t,IB,LB,he,{})}}function PB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("table"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function BB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}let jB=class extends ve{constructor(t){super(),be(this,t,BB,PB,he,{})}};function UB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("thead"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function qB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class WB extends ve{constructor(t){super(),be(this,t,qB,UB,he,{})}}function HB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("tbody"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function GB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class VB extends ve{constructor(t){super(),be(this,t,GB,HB,he,{})}}function XB(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("tr"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function YB(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class ZB extends ve{constructor(t){super(),be(this,t,YB,XB,he,{})}}function KB(e){let t,n;const i=e[3].default,r=ct(i,e,e[2],null);return{c(){t=H("td"),r&&r.c(),D(t,"align",e[1])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&4)&&dt(r,i,s,s[2],n?ft(i,s[2],o,null):ht(s[2]),null),(!n||o&2)&&D(t,"align",s[1])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function JB(e){let t,n;const i=e[3].default,r=ct(i,e,e[2],null);return{c(){t=H("th"),r&&r.c(),D(t,"align",e[1])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&4)&&dt(r,i,s,s[2],n?ft(i,s[2],o,null):ht(s[2]),null),(!n||o&2)&&D(t,"align",s[1])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function QB(e){let t,n,i,r;const s=[JB,KB],o=[];function a(l,u){return l[0]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function ej(e,t,n){let{$$slots:i={},$$scope:r}=t,{header:s}=t,{align:o}=t;return e.$$set=a=>{"header"in a&&n(0,s=a.header),"align"in a&&n(1,o=a.align),"$$scope"in a&&n(2,r=a.$$scope)},[s,o,r,i]}class tj extends ve{constructor(t){super(),be(this,t,ej,QB,he,{header:0,align:1})}}function nj(e){let t,n;const i=e[3].default,r=ct(i,e,e[2],null);return{c(){t=H("ul"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&4)&&dt(r,i,s,s[2],n?ft(i,s[2],o,null):ht(s[2]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function ij(e){let t,n;const i=e[3].default,r=ct(i,e,e[2],null);return{c(){t=H("ol"),r&&r.c(),D(t,"start",e[1])},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,o){r&&r.p&&(!n||o&4)&&dt(r,i,s,s[2],n?ft(i,s[2],o,null):ht(s[2]),null),(!n||o&2)&&D(t,"start",s[1])},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function rj(e){let t,n,i,r;const s=[ij,nj],o=[];function a(l,u){return l[0]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function sj(e,t,n){let{$$slots:i={},$$scope:r}=t,{ordered:s}=t,{start:o}=t;return e.$$set=a=>{"ordered"in a&&n(0,s=a.ordered),"start"in a&&n(1,o=a.start),"$$scope"in a&&n(2,r=a.$$scope)},[s,o,r,i]}class oj extends ve{constructor(t){super(),be(this,t,sj,rj,he,{ordered:0,start:1})}}function aj(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("li"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function lj(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class uj extends ve{constructor(t){super(),be(this,t,lj,aj,he,{})}}function cj(e){let t;return{c(){t=H("hr")},m(n,i){z(n,t,i)},p:re,i:re,o:re,d(n){n&&L(t)}}}class fj extends ve{constructor(t){super(),be(this,t,null,cj,he,{})}}function dj(e){let t,n;return{c(){t=new gz(!1),n=Ae(),t.a=n},m(i,r){t.m(e[0],i,r),z(i,n,r)},p(i,[r]){r&1&&t.p(i[0])},i:re,o:re,d(i){i&&(L(n),t.d())}}}function hj(e,t,n){let{text:i}=t;return e.$$set=r=>{"text"in r&&n(0,i=r.text)},[i]}class pj extends ve{constructor(t){super(),be(this,t,hj,dj,he,{text:0})}}function gj(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("blockquote"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function mj(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class yj extends ve{constructor(t){super(),be(this,t,mj,gj,he,{})}}function bj(e){let t,n,i;return{c(){t=H("pre"),n=H("code"),i=Be(e[1]),D(t,"class",e[0])},m(r,s){z(r,t,s),X(t,n),X(n,i)},p(r,[s]){s&2&&pt(i,r[1]),s&1&&D(t,"class",r[0])},i:re,o:re,d(r){r&&L(t)}}}function vj(e,t,n){let{lang:i}=t,{text:r}=t;return e.$$set=s=>{"lang"in s&&n(0,i=s.lang),"text"in s&&n(1,r=s.text)},[i,r]}class xj extends ve{constructor(t){super(),be(this,t,vj,bj,he,{lang:0,text:1})}}function _j(e){let t,n;const i=e[1].default,r=ct(i,e,e[0],null);return{c(){t=H("br"),r&&r.c()},m(s,o){z(s,t,o),r&&r.m(s,o),n=!0},p(s,[o]){r&&r.p&&(!n||o&1)&&dt(r,i,s,s[0],n?ft(i,s[0],o,null):ht(s[0]),null)},i(s){n||(F(r,s),n=!0)},o(s){N(r,s),n=!1},d(s){s&&L(t),r&&r.d(s)}}}function wj(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class kj extends ve{constructor(t){super(),be(this,t,wj,_j,he,{})}}const $j={heading:pB,paragraph:yB,text:xB,image:kB,link:CB,em:TB,strong:zB,codespan:RB,del:DB,table:jB,tablehead:WB,tablebody:VB,tablerow:ZB,tablecell:tj,list:oj,orderedlistitem:null,unorderedlistitem:null,listitem:uj,hr:fj,html:pj,blockquote:yj,code:xj,br:kj},Ej={baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1};function Cj(e){let t,n;return t=new fa({props:{tokens:e[0],renderers:e[1]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.tokens=i[0]),r&2&&(s.renderers=i[1]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function Sj(e,t,n){let i,r,s,o,{source:a=[]}=t,{renderers:l={}}=t,{options:u={}}=t,{isInline:c=!1}=t;const f=Bm();let d,h,p;return F5(T6,{slug:g=>r?r.slug(g):"",getOptions:()=>s}),Mc(()=>{n(7,p=!0)}),e.$$set=g=>{"source"in g&&n(2,a=g.source),"renderers"in g&&n(3,l=g.renderers),"options"in g&&n(4,u=g.options),"isInline"in g&&n(5,c=g.isInline)},e.$$.update=()=>{e.$$.dirty&4&&n(8,i=Array.isArray(a)),e.$$.dirty&4&&(r=a?new Ah:void 0),e.$$.dirty&16&&n(9,s={...Ej,...u}),e.$$.dirty&869&&(i?n(0,d=a):(n(6,h=new Zi(s)),n(0,d=c?h.inlineTokens(a):h.lex(a)),f("parsed",{tokens:d}))),e.$$.dirty&8&&n(1,o={...$j,...l}),e.$$.dirty&385&&p&&!i&&f("parsed",{tokens:d})},[d,o,a,l,u,c,h,p,i,s]}class Aj extends ve{constructor(t){super(),be(this,t,Sj,Cj,he,{source:2,renderers:3,options:4,isInline:5})}}function Tj(e){let t,n;return t=new Aj({props:{source:e[0].source}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.source=i[0].source),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function Mj(e,t,n){let{componentData:i}=t;return e.$$set=r=>{"componentData"in r&&n(0,i=r.componentData)},[i]}class M6 extends ve{constructor(t){super(),be(this,t,Mj,Tj,he,{componentData:0})}}function Fj(e){let t,n,i;const r=e[2].default,s=ct(r,e,e[1],null);return{c(){var o;t=H("div"),s&&s.c(),D(t,"id",n=`page-${((o=e[0])==null?void 0:o.title)||"No Title"}`),D(t,"class","page svelte-v7ihqd"),D(t,"data-component","page")},m(o,a){z(o,t,a),s&&s.m(t,null),i=!0},p(o,[a]){var l;s&&s.p&&(!i||a&2)&&dt(s,r,o,o[1],i?ft(r,o[1],a,null):ht(o[1]),null),(!i||a&1&&n!==(n=`page-${((l=o[0])==null?void 0:l.title)||"No Title"}`))&&D(t,"id",n)},i(o){i||(F(s,o),i=!0)},o(o){N(s,o),i=!1},d(o){o&&L(t),s&&s.d(o)}}}function Dj(e,t,n){let{$$slots:i={},$$scope:r}=t,{componentData:s}=t;return e.$$set=o=>{"componentData"in o&&n(0,s=o.componentData),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Nj extends ve{constructor(t){super(),be(this,t,Dj,Fj,he,{componentData:0})}}function F6(e){let t,n,i=e[5]&&D6(e),r=e[4]&&N6(e);return{c(){t=H("div"),i&&i.c(),n=je(),r&&r.c(),D(t,"class","info svelte-ljrmzp")},m(s,o){z(s,t,o),i&&i.m(t,null),X(t,n),r&&r.m(t,null)},p(s,o){s[5]?i?i.p(s,o):(i=D6(s),i.c(),i.m(t,n)):i&&(i.d(1),i=null),s[4]?r?r.p(s,o):(r=N6(s),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(s){s&&L(t),i&&i.d(),r&&r.d()}}}function D6(e){let t,n,i,r,s;return{c(){t=H("label"),n=Be(e[5]),i=je(),r=H("span"),s=Be(e[3]),D(r,"class","labelValue svelte-ljrmzp"),D(t,"for",e[6]),D(t,"class","svelte-ljrmzp")},m(o,a){z(o,t,a),X(t,n),X(t,i),X(t,r),X(r,s)},p(o,a){a&32&&pt(n,o[5]),a&8&&pt(s,o[3]),a&64&&D(t,"for",o[6])},d(o){o&&L(t)}}}function N6(e){let t,n;return{c(){t=H("span"),n=Be(e[4]),D(t,"title",e[4]),D(t,"class","details svelte-ljrmzp")},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&16&&pt(n,i[4]),r&16&&D(t,"title",i[4])},d(i){i&&L(t)}}}function Oj(e){let t,n,i,r,s,o=(e[0]||"")+"",a,l=(e[5]||e[4])&&F6(e);return{c(){t=H("div"),n=H("div"),l&&l.c(),i=je(),r=H("progress"),s=Be(e[1]),a=Be(o),D(r,"id",e[6]),D(r,"max",e[2]),r.value=e[1],D(r,"style","color: red !important"),D(r,"class","svelte-ljrmzp"),D(n,"class","inner svelte-ljrmzp"),D(t,"class","container svelte-ljrmzp")},m(u,c){z(u,t,c),X(t,n),l&&l.m(n,null),X(n,i),X(n,r),X(r,s),X(r,a)},p(u,[c]){u[5]||u[4]?l?l.p(u,c):(l=F6(u),l.c(),l.m(n,i)):l&&(l.d(1),l=null),c&2&&pt(s,u[1]),c&1&&o!==(o=(u[0]||"")+"")&&pt(a,o),c&64&&D(r,"id",u[6]),c&4&&D(r,"max",u[2]),c&2&&(r.value=u[1])},i:re,o:re,d(u){u&&L(t),l&&l.d()}}}function Rj(e,t,n){let i,r,s,o,a,l,{componentData:u}=t;s==null&&(s=0);let c=s.toString();return e.$$set=f=>{"componentData"in f&&n(7,u=f.componentData)},e.$$.update=()=>{e.$$.dirty&128&&n(2,{max:i,id:r,value:s,label:o,unit:a,details:l}=u,i,(n(6,r),n(7,u)),(n(1,s),n(7,u)),(n(5,o),n(7,u)),(n(0,a),n(7,u)),(n(4,l),n(7,u))),e.$$.dirty&7&&(i?n(3,c=`${s}/${i}`):a&&n(3,c=`${s} ${a}`))},[a,s,i,c,l,o,r,u]}class O6 extends ve{constructor(t){super(),be(this,t,Rj,Oj,he,{componentData:7})}}function R6(e){let t,n;return{c(){t=H("h3"),n=Be(e[3])},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&8&&pt(n,i[3])},d(i){i&&L(t)}}}function L6(e){let t,n;return{c(){t=H("p"),n=Be(e[2]),D(t,"class","description")},m(i,r){z(i,t,r),X(t,n)},p(i,r){r&4&&pt(n,i[2])},d(i){i&&L(t)}}}function Lj(e){let t,n,i,r,s,o,a,l,u=e[3]&&R6(e),c=e[2]&&L6(e);const f=e[6].default,d=ct(f,e,e[5],null);return{c(){t=H("section"),n=H("div"),u&&u.c(),i=je(),c&&c.c(),r=je(),s=H("div"),d&&d.c(),o=je(),a=H("hr"),D(n,"class","heading svelte-17n0qr8"),D(s,"class","sectionItems svelte-17n0qr8"),D(s,"style",e[0]),D(a,"class","svelte-17n0qr8"),D(t,"class","container svelte-17n0qr8"),D(t,"data-component","section"),D(t,"data-section-id",e[3]),Vn(t,"columns",e[1])},m(h,p){z(h,t,p),X(t,n),u&&u.m(n,null),X(n,i),c&&c.m(n,null),X(t,r),X(t,s),d&&d.m(s,null),X(t,o),X(t,a),l=!0},p(h,[p]){h[3]?u?u.p(h,p):(u=R6(h),u.c(),u.m(n,i)):u&&(u.d(1),u=null),h[2]?c?c.p(h,p):(c=L6(h),c.c(),c.m(n,null)):c&&(c.d(1),c=null),d&&d.p&&(!l||p&32)&&dt(d,f,h,h[5],l?ft(f,h[5],p,null):ht(h[5]),null),(!l||p&1)&&D(s,"style",h[0]),(!l||p&8)&&D(t,"data-section-id",h[3]),(!l||p&2)&&Vn(t,"columns",h[1])},i(h){l||(F(d,h),l=!0)},o(h){N(d,h),l=!1},d(h){h&&L(t),u&&u.d(),c&&c.d(),d&&d.d(h)}}}function Ij(e,t,n){let i,r,s,{$$slots:o={},$$scope:a}=t,{componentData:l}=t,u;return s&&(u=`grid-template-columns: repeat(${s||1}, 1fr);`),e.$$set=c=>{"componentData"in c&&n(4,l=c.componentData),"$$scope"in c&&n(5,a=c.$$scope)},e.$$.update=()=>{e.$$.dirty&16&&n(3,{title:i,subtitle:r,columns:s}=l,i,(n(2,r),n(4,l)),(n(1,s),n(4,l)))},[u,s,r,i,l,a,o]}class zj extends ve{constructor(t){super(),be(this,t,Ij,Lj,he,{componentData:4})}}/*!
|
|
51
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
52
|
+
* (c) 2017-2022 Joachim Wester
|
|
53
|
+
* MIT licensed
|
|
54
|
+
*/var Pj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bj=Object.prototype.hasOwnProperty;function Zm(e,t){return Bj.call(e,t)}function Km(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var i=[];for(var r in e)Zm(e,r)&&i.push(r);return i}function di(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Jm(e){for(var t=0,n=e.length,i;t<n;){if(i=e.charCodeAt(t),i>=48&&i<=57){t++;continue}return!1}return!0}function ha(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function I6(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Qm(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(Qm(e[t]))return!0}else if(typeof e=="object"){for(var i=Km(e),r=i.length,s=0;s<r;s++)if(Qm(e[i[s]]))return!0}}return!1}function z6(e,t){var n=[e];for(var i in t){var r=typeof t[i]=="object"?JSON.stringify(t[i],null,2):t[i];typeof r<"u"&&n.push(i+": "+r)}return n.join(`
|
|
55
|
+
`)}var P6=function(e){Pj(t,e);function t(n,i,r,s,o){var a=this.constructor,l=e.call(this,z6(n,{name:i,index:r,operation:s,tree:o}))||this;return l.name=i,l.index=r,l.operation=s,l.tree=o,Object.setPrototypeOf(l,a.prototype),l.message=z6(n,{name:i,index:r,operation:s,tree:o}),l}return t}(Error),$t=P6,jj=di,Ul={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var i=e[t];return delete e[t],{newDocument:n,removed:i}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:function(e,t,n){var i=Th(n,this.path);i&&(i=di(i));var r=pa(n,{op:"remove",path:this.from}).removed;return pa(n,{op:"add",path:this.path,value:r}),{newDocument:n,removed:i}},copy:function(e,t,n){var i=Th(n,this.from);return pa(n,{op:"add",path:this.path,value:di(i)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Nc(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Uj={add:function(e,t,n){return Jm(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var i=e.splice(t,1);return{newDocument:n,removed:i[0]}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:Ul.move,copy:Ul.copy,test:Ul.test,_get:Ul._get};function Th(e,t){if(t=="")return e;var n={op:"_get",path:t};return pa(e,n),n.value}function pa(e,t,n,i,r,s){if(n===void 0&&(n=!1),i===void 0&&(i=!0),r===void 0&&(r=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):Fh(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;if(t.op==="move"||t.op==="copy")return o.newDocument=Th(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=Nc(e,t.value),o.test===!1)throw new $t("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o.newDocument=e,o}else{if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(n)throw new $t("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return o}}else{i||(e=di(e));var a=t.path||"",l=a.split("/"),u=e,c=1,f=l.length,d=void 0,h=void 0,p=void 0;for(typeof n=="function"?p=n:p=Fh;;){if(h=l[c],h&&h.indexOf("~")!=-1&&(h=I6(h)),r&&(h=="__proto__"||h=="prototype"&&c>0&&l[c-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(u[h]===void 0?d=l.slice(0,c).join("/"):c==f-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),c++,Array.isArray(u)){if(h==="-")h=u.length;else{if(n&&!Jm(h))throw new $t("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);Jm(h)&&(h=~~h)}if(c>=f){if(n&&t.op==="add"&&h>u.length)throw new $t("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var o=Uj[t.op].call(t,u,h,e);if(o.test===!1)throw new $t("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}}else if(c>=f){var o=Ul[t.op].call(t,u,h,e);if(o.test===!1)throw new $t("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}if(u=u[h],n&&c<f&&(!u||typeof u!="object"))throw new $t("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function Mh(e,t,n,i,r){if(i===void 0&&(i=!0),r===void 0&&(r=!0),n&&!Array.isArray(t))throw new $t("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");i||(e=di(e));for(var s=new Array(t.length),o=0,a=t.length;o<a;o++)s[o]=pa(e,t[o],n,!0,r,o),e=s[o].newDocument;return s.newDocument=e,s}function qj(e,t,n){var i=pa(e,t);if(i.test===!1)throw new $t("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return i.newDocument}function Fh(e,t,n,i){if(typeof e!="object"||e===null||Array.isArray(e))throw new $t("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Ul[e.op]){if(typeof e.path!="string")throw new $t("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new $t('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new $t("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new $t("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Qm(e.value))throw new $t("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var r=e.path.split("/").length,s=i.split("/").length;if(r!==s+1&&r!==s)throw new $t("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==i)throw new $t("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var o={op:"_get",path:e.from,value:void 0},a=B6([o],n);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new $t("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new $t("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function B6(e,t,n){try{if(!Array.isArray(e))throw new $t("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Mh(di(t),di(e),n||!0);else{n=n||Fh;for(var i=0;i<e.length;i++)n(e[i],i,t,void 0)}}catch(r){if(r instanceof $t)return r;throw r}}function Nc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),i=Array.isArray(t),r,s,o;if(n&&i){if(s=e.length,s!=t.length)return!1;for(r=s;r--!==0;)if(!Nc(e[r],t[r]))return!1;return!0}if(n!=i)return!1;var a=Object.keys(e);if(s=a.length,s!==Object.keys(t).length)return!1;for(r=s;r--!==0;)if(!t.hasOwnProperty(a[r]))return!1;for(r=s;r--!==0;)if(o=a[r],!Nc(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}const Wj=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:$t,_areEquals:Nc,applyOperation:pa,applyPatch:Mh,applyReducer:qj,deepClone:jj,getValueByPointer:Th,validate:B6,validator:Fh},Symbol.toStringTag,{value:"Module"}));/*!
|
|
56
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
57
|
+
* (c) 2017-2021 Joachim Wester
|
|
58
|
+
* MIT license
|
|
59
|
+
*/var e2=new WeakMap,Hj=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),Gj=function(){function e(t,n){this.callback=t,this.observer=n}return e}();function Vj(e){return e2.get(e)}function Xj(e,t){return e.observers.get(t)}function Yj(e,t){e.observers.delete(t.callback)}function Zj(e,t){t.unobserve()}function Kj(e,t){var n=[],i,r=Vj(e);if(!r)r=new Hj(e),e2.set(e,r);else{var s=Xj(r,t);i=s&&s.observer}if(i)return i;if(i={},r.value=di(e),t){i.callback=t,i.next=null;var o=function(){t2(i)},a=function(){clearTimeout(i.next),i.next=setTimeout(o)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return i.patches=n,i.object=e,i.unobserve=function(){t2(i),clearTimeout(i.next),Yj(r,i),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new Gj(t,i)),i}function t2(e,t){t===void 0&&(t=!1);var n=e2.get(e.object);n2(n.value,e.object,e.patches,"",t),e.patches.length&&Mh(n.value,e.patches);var i=e.patches;return i.length>0&&(e.patches=[],e.callback&&e.callback(i)),i}function n2(e,t,n,i,r){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=Km(t),o=Km(e),a=!1,l=o.length-1;l>=0;l--){var u=o[l],c=e[u];if(Zm(t,u)&&!(t[u]===void 0&&c!==void 0&&Array.isArray(t)===!1)){var f=t[u];typeof c=="object"&&c!=null&&typeof f=="object"&&f!=null&&Array.isArray(c)===Array.isArray(f)?n2(c,f,n,i+"/"+ha(u),r):c!==f&&(r&&n.push({op:"test",path:i+"/"+ha(u),value:di(c)}),n.push({op:"replace",path:i+"/"+ha(u),value:di(f)}))}else Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+ha(u),value:di(c)}),n.push({op:"remove",path:i+"/"+ha(u)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}))}if(!(!a&&s.length==o.length))for(var l=0;l<s.length;l++){var u=s[l];!Zm(e,u)&&t[u]!==void 0&&n.push({op:"add",path:i+"/"+ha(u),value:di(t[u])})}}}function Jj(e,t,n){n===void 0&&(n=!1);var i=[];return n2(e,t,i,"",n),i}Object.assign({},Wj,Object.freeze(Object.defineProperty({__proto__:null,compare:Jj,generate:t2,observe:Kj,unobserve:Zj},Symbol.toStringTag,{value:"Module"})),{JsonPatchError:P6,deepClone:di,escapePathComponent:ha,unescapePathComponent:I6});function j6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qj=/("(?:[^\\"]|\\.)*")|[:,]/g,eU=function(t,n){var i,r,s;return n=n||{},i=JSON.stringify([1],void 0,n.indent===void 0?2:n.indent).slice(2,-3),r=i===""?1/0:n.maxLength===void 0?80:n.maxLength,s=n.replacer,function o(a,l,u){var c,f,d,h,p,g,m,y,b,v,x,_;if(a&&typeof a.toJSON=="function"&&(a=a.toJSON()),x=JSON.stringify(a,s),x===void 0)return x;if(m=r-l.length-u,x.length<=m&&(b=x.replace(Qj,function(k,w){return w||k+" "}),b.length<=m))return b;if(s!=null&&(a=JSON.parse(x),s=void 0),typeof a=="object"&&a!==null){if(y=l+i,d=[],f=0,Array.isArray(a))for(v="[",c="]",m=a.length;f<m;f++)d.push(o(a[f],y,f===m-1?0:1)||"null");else for(v="{",c="}",g=Object.keys(a),m=g.length;f<m;f++)h=g[f],p=JSON.stringify(h)+": ",_=o(a[h],y,p.length+(f===m-1?0:1)),_!==void 0&&d.push(p+_);if(d.length>0)return[v,i+d.join(`,
|
|
60
|
+
`+y),c].join(`
|
|
61
|
+
`+l)}return x}(t,"",0)};const i2=j6(eU);function Xn(e,t,n){return e.fields=t||[],e.fname=n,e}function Et(e){return e==null?null:e.fname}function fn(e){return e==null?null:e.fields}function U6(e){return e.length===1?tU(e[0]):nU(e)}const tU=e=>function(t){return t[e]},nU=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function U(e){throw Error(e)}function Or(e){const t=[],n=e.length;let i=null,r=0,s="",o,a,l;e=e+"";function u(){t.push(s+e.substring(o,a)),s="",o=a+1}for(o=a=0;a<n;++a)if(l=e[a],l==="\\")s+=e.substring(o,a++),o=a;else if(l===i)u(),i=null,r=-1;else{if(i)continue;o===r&&l==='"'||o===r&&l==="'"?(o=a+1,i=l):l==="."&&!r?a>o?u():o=a+1:l==="["?(a>o&&u(),r=o=a+1):l==="]"&&(r||U("Access path missing open bracket: "+e),r>0&&u(),r=0,o=a+1)}return r&&U("Access path missing closing bracket: "+e),i&&U("Access path missing closing quote: "+e),a>o&&(a++,u()),t}function Ai(e,t,n){const i=Or(e);return e=i.length===1?i[0]:e,Xn((n&&n.get||U6)(i),[e],t||e)}const Oc=Ai("id"),dn=Xn(e=>e,[],"identity"),io=Xn(()=>0,[],"zero"),ql=Xn(()=>1,[],"one"),Ti=Xn(()=>!0,[],"true"),ro=Xn(()=>!1,[],"false");function iU(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const q6=0,r2=1,s2=2,W6=3,H6=4;function o2(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:iU,i=e||q6;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=r2&&n(t||"error","ERROR",arguments),this},warn(){return i>=s2&&n(t||"warn","WARN",arguments),this},info(){return i>=W6&&n(t||"log","INFO",arguments),this},debug(){return i>=H6&&n(t||"log","DEBUG",arguments),this}}}var q=Array.isArray;function ie(e){return e===Object(e)}const G6=e=>e!=="__proto__";function Wl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const s in r)if(s==="signals")i.signals=rU(i.signals,r.signals);else{const o=s==="legend"?{layout:1}:s==="style"?!0:null;Hl(i,s,r[s],o)}return i},{})}function Hl(e,t,n,i){if(!G6(t))return;let r,s;if(ie(n)&&!q(n)){s=ie(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?Hl(s,r,n[r]):G6(r)&&(s[r]=n[r])}else e[t]=n}function rU(e,t){if(e==null)return t;const n={},i=[];function r(s){n[s.name]||(n[s.name]=1,i.push(s))}return t.forEach(r),e.forEach(r),i}function Ue(e){return e[e.length-1]}function hn(e){return e==null||e===""?null:+e}const V6=e=>t=>e*Math.exp(t),X6=e=>t=>Math.log(e*t),Y6=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Z6=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Dh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Nh(e,t,n,i){const r=n(e[0]),s=n(Ue(e)),o=(s-r)*t;return[i(r-o),i(s-o)]}function K6(e,t){return Nh(e,t,hn,dn)}function J6(e,t){var n=Math.sign(e[0]);return Nh(e,t,X6(n),V6(n))}function Q6(e,t,n){return Nh(e,t,Dh(n),Dh(1/n))}function e4(e,t,n){return Nh(e,t,Y6(n),Z6(n))}function Oh(e,t,n,i,r){const s=i(e[0]),o=i(Ue(e)),a=t!=null?i(t):(s+o)/2;return[r(a+(s-a)*n),r(a+(o-a)*n)]}function a2(e,t,n){return Oh(e,t,n,hn,dn)}function l2(e,t,n){const i=Math.sign(e[0]);return Oh(e,t,n,X6(i),V6(i))}function Rh(e,t,n,i){return Oh(e,t,n,Dh(i),Dh(1/i))}function u2(e,t,n,i){return Oh(e,t,n,Y6(i),Z6(i))}function t4(e){return 1+~~(new Date(e).getMonth()/3)}function n4(e){return 1+~~(new Date(e).getUTCMonth()/3)}function ee(e){return e!=null?q(e)?e:[e]:[]}function i4(e,t,n){let i=e[0],r=e[1],s;return r<i&&(s=r,r=i,i=s),s=r-i,s>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-s),i+s]}function Me(e){return typeof e=="function"}const sU="descending";function c2(e,t,n){n=n||{},t=ee(t)||[];const i=[],r=[],s={},o=n.comparator||oU;return ee(e).forEach((a,l)=>{a!=null&&(i.push(t[l]===sU?-1:1),r.push(a=Me(a)?a:Ai(a,null,n)),(fn(a)||[]).forEach(u=>s[u]=1))}),r.length===0?null:Xn(o(r,i),Object.keys(s))}const Lh=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),oU=(e,t)=>e.length===1?aU(e[0],t[0]):lU(e,t,e.length),aU=(e,t)=>function(n,i){return Lh(e(n),e(i))*t},lU=(e,t,n)=>(t.push(0),function(i,r){let s,o=0,a=-1;for(;o===0&&++a<n;)s=e[a],o=Lh(s(i),s(r));return o*t[a]});function pn(e){return Me(e)?e:()=>e}function f2(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function Fe(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function Rr(e,t){let n=0,i,r,s,o;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(s=o=r;n<i;++n)r=e[n],r!=null&&(r<s&&(s=r),r>o&&(o=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(s=o=r;n<i;++n)r=t(e[n]),r!=null&&(r<s&&(s=r),r>o&&(o=r))}return[s,o]}function r4(e,t){const n=e.length;let i=-1,r,s,o,a,l;if(t==null){for(;++i<n;)if(s=e[i],s!=null&&s>=s){r=o=s;break}if(i===n)return[-1,-1];for(a=l=i;++i<n;)s=e[i],s!=null&&(r>s&&(r=s,a=i),o<s&&(o=s,l=i))}else{for(;++i<n;)if(s=t(e[i],i,e),s!=null&&s>=s){r=o=s;break}if(i===n)return[-1,-1];for(a=l=i;++i<n;)s=t(e[i],i,e),s!=null&&(r>s&&(r=s,a=i),o<s&&(o=s,l=i))}return[a,l]}const uU=Object.prototype.hasOwnProperty;function pe(e,t){return uU.call(e,t)}const Ih={};function Gl(e){let t={},n;function i(s){return pe(t,s)&&t[s]!==Ih}const r={size:0,empty:0,object:t,has:i,get(s){return i(s)?t[s]:void 0},set(s,o){return i(s)||(++r.size,t[s]===Ih&&--r.empty),t[s]=o,this},delete(s){return i(s)&&(--r.size,++r.empty,t[s]=Ih),this},clear(){r.size=r.empty=0,r.object=t={}},test(s){return arguments.length?(n=s,r):n},clean(){const s={};let o=0;for(const a in t){const l=t[a];l!==Ih&&(!n||!n(l))&&(s[a]=l,++o)}r.size=o,r.empty=0,r.object=t=s}};return e&&Object.keys(e).forEach(s=>{r.set(s,e[s])}),r}function s4(e,t,n,i,r,s){if(!n&&n!==0)return s;const o=+n;let a=e[0],l=Ue(e),u;l<a&&(u=a,a=l,l=u),u=Math.abs(t-a);const c=Math.abs(l-t);return u<c&&u<=o?i:c<=o?r:s}function K(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),Fe(i,n)}function Vl(e,t,n,i){let r=t[0],s=t[t.length-1],o;return r>s&&(o=r,r=s,s=o),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=s:e<s)}function so(e){return typeof e=="boolean"}function oo(e){return Object.prototype.toString.call(e)==="[object Date]"}function o4(e){return e&&Me(e[Symbol.iterator])}function Xe(e){return typeof e=="number"}function a4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function te(e){return typeof e=="string"}function d2(e,t,n){e&&(e=t?ee(e).map(a=>a.replace(/\\(.)/g,"$1")):ee(e));const i=e&&e.length,r=n&&n.get||U6,s=a=>r(t?[a]:Or(a));let o;if(!i)o=function(){return""};else if(i===1){const a=s(e[0]);o=function(l){return""+a(l)}}else{const a=e.map(s);o=function(l){let u=""+a[0](l),c=0;for(;++c<i;)u+="|"+a[c](l);return u}}return Xn(o,e,"key")}function l4(e,t){const n=e[0],i=Ue(e),r=+t;return r?r===1?i:n+r*(i-n):n}const cU=1e4;function u4(e){e=+e||cU;let t,n,i;const r=()=>{t={},n={},i=0},s=(o,a)=>(++i>e&&(n=t,t={},i=1),t[o]=a);return r(),{clear:r,has:o=>pe(t,o)||pe(n,o),get:o=>pe(t,o)?t[o]:pe(n,o)?s(o,n[o]):void 0,set:(o,a)=>pe(t,o)?t[o]=a:s(o,a)}}function c4(e,t,n,i){const r=t.length,s=n.length;if(!s)return t;if(!r)return n;const o=i||new t.constructor(r+s);let a=0,l=0,u=0;for(;a<r&&l<s;++u)o[u]=e(t[a],n[l])>0?n[l++]:t[a++];for(;a<r;++a,++u)o[u]=t[a];for(;l<s;++l,++u)o[u]=n[l];return o}function Rc(e,t){let n="";for(;--t>=0;)n+=e;return n}function f4(e,t,n,i){const r=n||" ",s=e+"",o=t-s.length;return o<=0?s:i==="left"?Rc(r,o)+s:i==="center"?Rc(r,~~(o/2))+s+Rc(r,Math.ceil(o/2)):s+Rc(r,o)}function Lc(e){return e&&Ue(e)-e[0]||0}function J(e){return q(e)?"["+e.map(J)+"]":ie(e)||te(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function h2(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const fU=e=>Xe(e)||oo(e)?e:Date.parse(e);function p2(e,t){return t=t||fU,e==null||e===""?null:t(e)}function g2(e){return e==null||e===""?null:e+""}function Ki(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function d4(e,t,n,i){const r=i??"…",s=e+"",o=s.length,a=Math.max(0,t-r.length);return o<=t?s:n==="left"?r+s.slice(o-a):n==="center"?s.slice(0,Math.ceil(a/2))+r+s.slice(o-~~(a/2)):s.slice(0,a)+r}function ao(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const s=t(e[r]);s&&n(s,r,e)}}else e.forEach(n)}var h4={},m2={},y2=34,Ic=10,b2=13;function p4(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function dU(e,t){var n=p4(e);return function(i,r){return t(n(i),r,e)}}function g4(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function Yn(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function hU(e){return e<0?"-"+Yn(-e,6):e>9999?"+"+Yn(e,6):Yn(e,4)}function pU(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":hU(e.getUTCFullYear())+"-"+Yn(e.getUTCMonth()+1,2)+"-"+Yn(e.getUTCDate(),2)+(r?"T"+Yn(t,2)+":"+Yn(n,2)+":"+Yn(i,2)+"."+Yn(r,3)+"Z":i?"T"+Yn(t,2)+":"+Yn(n,2)+":"+Yn(i,2)+"Z":n||t?"T"+Yn(t,2)+":"+Yn(n,2)+"Z":"")}function gU(e){var t=new RegExp('["'+e+`
|
|
62
|
+
\r]`),n=e.charCodeAt(0);function i(f,d){var h,p,g=r(f,function(m,y){if(h)return h(m,y-1);p=m,h=d?dU(m,d):p4(m)});return g.columns=p||[],g}function r(f,d){var h=[],p=f.length,g=0,m=0,y,b=p<=0,v=!1;f.charCodeAt(p-1)===Ic&&--p,f.charCodeAt(p-1)===b2&&--p;function x(){if(b)return m2;if(v)return v=!1,h4;var k,w=g,$;if(f.charCodeAt(w)===y2){for(;g++<p&&f.charCodeAt(g)!==y2||f.charCodeAt(++g)===y2;);return(k=g)>=p?b=!0:($=f.charCodeAt(g++))===Ic?v=!0:$===b2&&(v=!0,f.charCodeAt(g)===Ic&&++g),f.slice(w+1,k-1).replace(/""/g,'"')}for(;g<p;){if(($=f.charCodeAt(k=g++))===Ic)v=!0;else if($===b2)v=!0,f.charCodeAt(g)===Ic&&++g;else if($!==n)continue;return f.slice(w,k)}return b=!0,f.slice(w,p)}for(;(y=x())!==m2;){for(var _=[];y!==h4&&y!==m2;)_.push(y),y=x();d&&(_=d(_,m++))==null||h.push(_)}return h}function s(f,d){return f.map(function(h){return d.map(function(p){return c(h[p])}).join(e)})}function o(f,d){return d==null&&(d=g4(f)),[d.map(c).join(e)].concat(s(f,d)).join(`
|
|
63
|
+
`)}function a(f,d){return d==null&&(d=g4(f)),s(f,d).join(`
|
|
64
|
+
`)}function l(f){return f.map(u).join(`
|
|
65
|
+
`)}function u(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?pU(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:i,parseRows:r,format:o,formatBody:a,formatRows:l,formatRow:u,formatValue:c}}function mU(e){return e}function yU(e){if(e==null)return mU;var t,n,i=e.scale[0],r=e.scale[1],s=e.translate[0],o=e.translate[1];return function(a,l){l||(t=n=0);var u=2,c=a.length,f=new Array(c);for(f[0]=(t+=a[0])*i+s,f[1]=(n+=a[1])*r+o;u<c;)f[u]=a[u],++u;return f}}function bU(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function vU(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return m4(e,n)})}:m4(e,t)}function m4(e,t){var n=t.id,i=t.bbox,r=t.properties==null?{}:t.properties,s=y4(e,t);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function y4(e,t){var n=yU(e.transform),i=e.arcs;function r(c,f){f.length&&f.pop();for(var d=i[c<0?~c:c],h=0,p=d.length;h<p;++h)f.push(n(d[h],h));c<0&&bU(f,p)}function s(c){return n(c)}function o(c){for(var f=[],d=0,h=c.length;d<h;++d)r(c[d],f);return f.length<2&&f.push(f[0]),f}function a(c){for(var f=o(c);f.length<4;)f.push(f[0]);return f}function l(c){return c.map(a)}function u(c){var f=c.type,d;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(u)};case"Point":d=s(c.coordinates);break;case"MultiPoint":d=c.coordinates.map(s);break;case"LineString":d=o(c.arcs);break;case"MultiLineString":d=c.arcs.map(o);break;case"Polygon":d=l(c.arcs);break;case"MultiPolygon":d=c.arcs.map(l);break;default:return null}return{type:f,coordinates:d}}return u(t)}function xU(e,t){var n={},i={},r={},s=[],o=-1;t.forEach(function(u,c){var f=e.arcs[u<0?~u:u],d;f.length<3&&!f[1][0]&&!f[1][1]&&(d=t[++o],t[o]=u,t[c]=d)}),t.forEach(function(u){var c=a(u),f=c[0],d=c[1],h,p;if(h=r[f])if(delete r[h.end],h.push(u),h.end=d,p=i[d]){delete i[p.start];var g=p===h?h:h.concat(p);i[g.start=h.start]=r[g.end=p.end]=g}else i[h.start]=r[h.end]=h;else if(h=i[d])if(delete i[h.start],h.unshift(u),h.start=f,p=r[f]){delete r[p.end];var m=p===h?h:p.concat(h);i[m.start=p.start]=r[m.end=h.end]=m}else i[h.start]=r[h.end]=h;else h=[u],i[h.start=f]=r[h.end=d]=h});function a(u){var c=e.arcs[u<0?~u:u],f=c[0],d;return e.transform?(d=[0,0],c.forEach(function(h){d[0]+=h[0],d[1]+=h[1]})):d=c[c.length-1],u<0?[d,f]:[f,d]}function l(u,c){for(var f in u){var d=u[f];delete c[d.start],delete d.start,delete d.end,d.forEach(function(h){n[h<0?~h:h]=1}),s.push(d)}}return l(r,i),l(i,r),t.forEach(function(u){n[u<0?~u:u]||s.push([u])}),s}function _U(e){return y4(e,wU.apply(this,arguments))}function wU(e,t,n){var i,r,s;if(arguments.length>1)i=kU(e,t,n);else for(r=0,i=new Array(s=e.arcs.length);r<s;++r)i[r]=r;return{type:"MultiLineString",arcs:xU(e,i)}}function kU(e,t,n){var i=[],r=[],s;function o(f){var d=f<0?~f:f;(r[d]||(r[d]=[])).push({i:f,g:s})}function a(f){f.forEach(o)}function l(f){f.forEach(a)}function u(f){f.forEach(l)}function c(f){switch(s=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":l(f.arcs);break;case"MultiPolygon":u(f.arcs);break}}return c(t),r.forEach(n==null?function(f){i.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&i.push(f[0].i)}),i}function bs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $U(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xl(e){let t,n,i;e.length!==2?(t=bs,n=(a,l)=>bs(e(a),l),i=(a,l)=>e(a)-l):(t=e===bs||e===$U?e:EU,n=e,i=e);function r(a,l,u=0,c=a.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(a[f],l)<0?u=f+1:c=f}while(u<c)}return u}function s(a,l,u=0,c=a.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(a[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(a,l,u=0,c=a.length){const f=r(a,l,u,c-1);return f>u&&i(a[f-1],l)>-i(a[f],l)?f-1:f}return{left:r,center:o,right:s}}function EU(){return 0}function b4(e){return e===null?NaN:+e}function*CU(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&(yield i)}}const v4=Xl(bs),zh=v4.right,SU=v4.left;Xl(b4).center;const zc=zh;function AU(e,t){let n=0,i,r=0,s=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(i=o-r,r+=i/++n,s+=i*(o-r));else{let o=-1;for(let a of e)(a=t(a,++o,e))!=null&&(a=+a)>=a&&(i=a-r,r+=i/++n,s+=i*(a-r))}if(n>1)return s/(n-1)}function TU(e,t){const n=AU(e,t);return n&&Math.sqrt(n)}class Sn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const s=n[r],o=t+s,a=Math.abs(t)<Math.abs(s)?t-(o-s):s-(o-t);a&&(n[i++]=a),t=o}return n[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let n=this._n,i,r,s,o=0;if(n>0){for(o=t[--n];n>0&&(i=o,r=t[--n],o=i+r,s=r-(o-i),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(r=s*2,i=o+r,r==i-o&&(o=i))}return o}}class x4 extends Map{constructor(t,n=k4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(v2(this,t))}has(t){return super.has(v2(this,t))}set(t,n){return super.set(_4(this,t),n)}delete(t){return super.delete(w4(this,t))}}class Ph extends Set{constructor(t,n=k4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const i of t)this.add(i)}has(t){return super.has(v2(this,t))}add(t){return super.add(_4(this,t))}delete(t){return super.delete(w4(this,t))}}function v2({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function _4({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}function w4({_intern:e,_key:t},n){const i=t(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}function k4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function MU(e,t){return Array.from(t,n=>e[n])}function FU(e=bs){if(e===bs)return $4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||i===0?i:(e(n,n)===0)-(e(t,t)===0)}}function $4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const DU=Math.sqrt(50),NU=Math.sqrt(10),OU=Math.sqrt(2);function Bh(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),o=s>=DU?10:s>=NU?5:s>=OU?2:1;let a,l,u;return r<0?(u=Math.pow(10,-r)/o,a=Math.round(e*u),l=Math.round(t*u),a/u<e&&++a,l/u>t&&--l,u=-u):(u=Math.pow(10,r)*o,a=Math.round(e/u),l=Math.round(t/u),a*u<e&&++a,l*u>t&&--l),l<a&&.5<=n&&n<2?Bh(e,t,n*2):[a,l,u]}function x2(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const i=t<e,[r,s,o]=i?Bh(t,e,n):Bh(e,t,n);if(!(s>=r))return[];const a=s-r+1,l=new Array(a);if(i)if(o<0)for(let u=0;u<a;++u)l[u]=(s-u)/-o;else for(let u=0;u<a;++u)l[u]=(s-u)*o;else if(o<0)for(let u=0;u<a;++u)l[u]=(r+u)/-o;else for(let u=0;u<a;++u)l[u]=(r+u)*o;return l}function _2(e,t,n){return t=+t,e=+e,n=+n,Bh(e,t,n)[2]}function lo(e,t,n){t=+t,e=+e,n=+n;const i=t<e,r=i?_2(t,e,n):_2(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}function ga(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function w2(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function E4(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=r===void 0?$4:FU(r);i>n;){if(i-n>600){const l=i-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(n,Math.floor(t-u*f/l+d)),p=Math.min(i,Math.floor(t+(l-u)*f/l+d));E4(e,t,h,p,r)}const s=e[t];let o=n,a=i;for(Pc(e,n,t),r(e[i],s)>0&&Pc(e,n,i);o<a;){for(Pc(e,o,a),++o,--a;r(e[o],s)<0;)++o;for(;r(e[a],s)>0;)--a}r(e[n],s)===0?Pc(e,n,a):(++a,Pc(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}return e}function Pc(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function k2(e,t,n){if(e=Float64Array.from(CU(e,n)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return w2(e);if(t>=1)return ga(e);var i,r=(i-1)*t,s=Math.floor(r),o=ga(E4(e,s).subarray(0,s+1)),a=w2(e.subarray(s+1));return o+(a-o)*(r-s)}}function C4(e,t,n=b4){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,s=Math.floor(r),o=+n(e[s],s,e),a=+n(e[s+1],s+1,e);return o+(a-o)*(r-s)}}function RU(e,t){let n=0,i=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let s of e)(s=t(s,++r,e))!=null&&(s=+s)>=s&&(++n,i+=s)}if(n)return i/n}function S4(e,t){return k2(e,.5,t)}function*LU(e){for(const t of e)yield*t}function A4(e){return Array.from(LU(e))}function hi(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(r);++i<r;)s[i]=e+i*n;return s}function T4(e,t){let n=0;if(t===void 0)for(let i of e)(i=+i)&&(n+=i);else{let i=-1;for(let r of e)(r=+t(r,++i,e))&&(n+=r)}return n}function IU(e,...t){e=new Ph(e),t=t.map(zU);e:for(const n of e)for(const i of t)if(!i.has(n)){e.delete(n);continue e}return e}function zU(e){return e instanceof Ph?e:new Ph(e)}function PU(...e){const t=new Ph;for(const n of e)for(const i of n)t.add(i);return t}function BU(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jh(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Yl(e){return e=jh(Math.abs(e)),e?e[1]:NaN}function jU(e,t){return function(n,i){for(var r=n.length,s=[],o=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[o=(o+1)%e.length];return s.reverse().join(t)}}function UU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var qU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ma(e){if(!(t=qU.exec(e)))throw new Error("invalid format: "+e);var t;return new $2({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ma.prototype=$2.prototype;function $2(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}$2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function WU(e){e:for(var t=e.length,n=1,i=-1,r;n<t;++n)switch(e[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+e[n])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var M4;function HU(e,t){var n=jh(e,t);if(!n)return e+"";var i=n[0],r=n[1],s=r-(M4=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+jh(e,Math.max(0,t+s-1))[0]}function F4(e,t){var n=jh(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const D4={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:BU,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>F4(e*100,t),r:F4,s:HU,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function N4(e){return e}var O4=Array.prototype.map,R4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function L4(e){var t=e.grouping===void 0||e.thousands===void 0?N4:jU(O4.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?N4:UU(O4.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=ma(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,m=f.zero,y=f.width,b=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(b=!0,_="g"):D4[_]||(v===void 0&&(v=12),x=!0,_="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var k=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=g==="$"?i:/[%p]/.test(_)?o:"",$=D4[_],S=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(A){var R=k,C=w,M,T,O;if(_==="c")C=$(A)+C,A="";else{A=+A;var P=A<0||1/A<0;if(A=isNaN(A)?l:$(Math.abs(A),v),x&&(A=WU(A)),P&&+A==0&&p!=="+"&&(P=!1),R=(P?p==="("?p:a:p==="-"||p==="("?"":p)+R,C=(_==="s"?R4[8+M4/3]:"")+C+(P&&p==="("?")":""),S){for(M=-1,T=A.length;++M<T;)if(O=A.charCodeAt(M),48>O||O>57){C=(O===46?r+A.slice(M+1):A.slice(M))+C,A=A.slice(0,M);break}}}b&&!m&&(A=t(A,1/0));var j=R.length+A.length+C.length,W=j<y?new Array(y-j+1).join(d):"";switch(b&&m&&(A=t(W+A,W.length?y-C.length:1/0),W=""),h){case"<":A=R+A+C+W;break;case"=":A=R+W+A+C;break;case"^":A=W.slice(0,j=W.length>>1)+R+A+C+W.slice(j);break;default:A=W+R+A+C;break}return s(A)}return E.toString=function(){return f+""},E}function c(f,d){var h=u((f=ma(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Yl(d)/3)))*3,g=Math.pow(10,-p),m=R4[8+p/3];return function(y){return h(g*y)+m}}return{format:u,formatPrefix:c}}var Uh,qh,E2;GU({thousands:",",grouping:[3],currency:["$",""]});function GU(e){return Uh=L4(e),qh=Uh.format,E2=Uh.formatPrefix,Uh}function I4(e){return Math.max(0,-Yl(Math.abs(e)))}function z4(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yl(t)/3)))*3-Yl(Math.abs(e)))}function P4(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yl(t)-Yl(e))+1}const C2=new Date,S2=new Date;function Lt(e,t,n,i){function r(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(e(s=new Date(+s)),s),r.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),r.round=s=>{const o=r(s),a=r.ceil(s);return s-o<a-s?o:a},r.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),r.range=(s,o,a)=>{const l=[];if(s=r.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let u;do l.push(u=new Date(+s)),t(s,a),e(s);while(u<s&&s<o);return l},r.filter=s=>Lt(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;t(o,-1),!s(o););else for(;--a>=0;)for(;t(o,1),!s(o););}),n&&(r.count=(s,o)=>(C2.setTime(+s),S2.setTime(+o),e(C2),e(S2),Math.floor(n(C2,S2))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?o=>i(o)%s===0:o=>r.count(0,o)%s===0):r)),r}const Zl=Lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Zl),Zl.range;const vs=1e3,Mi=vs*60,xs=Mi*60,_s=xs*24,A2=_s*7,B4=_s*30,T2=_s*365,ws=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*vs)},(e,t)=>(t-e)/vs,e=>e.getUTCSeconds());ws.range;const Wh=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vs)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getMinutes());Wh.range;const Hh=Lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCMinutes());Hh.range;const Gh=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vs-e.getMinutes()*Mi)},(e,t)=>{e.setTime(+e+t*xs)},(e,t)=>(t-e)/xs,e=>e.getHours());Gh.range;const Vh=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*xs)},(e,t)=>(t-e)/xs,e=>e.getUTCHours());Vh.range;const ks=Lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mi)/_s,e=>e.getDate()-1);ks.range;const uo=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_s,e=>e.getUTCDate()-1);uo.range;const j4=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_s,e=>Math.floor(e/_s));j4.range;function ya(e){return Lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Mi)/A2)}const Kl=ya(0),Xh=ya(1),VU=ya(2),XU=ya(3),Jl=ya(4),YU=ya(5),ZU=ya(6);Kl.range,Xh.range,VU.range,XU.range,Jl.range,YU.range,ZU.range;function ba(e){return Lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/A2)}const Ql=ba(0),Yh=ba(1),KU=ba(2),JU=ba(3),eu=ba(4),QU=ba(5),eq=ba(6);Ql.range,Yh.range,KU.range,JU.range,eu.range,QU.range,eq.range;const Bc=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Bc.range;const jc=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());jc.range;const Lr=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Lr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Lr.range;const Ir=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ir.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ir.range;function U4(e,t,n,i,r,s){const o=[[ws,1,vs],[ws,5,5*vs],[ws,15,15*vs],[ws,30,30*vs],[s,1,Mi],[s,5,5*Mi],[s,15,15*Mi],[s,30,30*Mi],[r,1,xs],[r,3,3*xs],[r,6,6*xs],[r,12,12*xs],[i,1,_s],[i,2,2*_s],[n,1,A2],[t,1,B4],[t,3,3*B4],[e,1,T2]];function a(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),p=h?h.range(u,+c+1):[];return d?p.reverse():p}function l(u,c,f){const d=Math.abs(c-u)/f,h=Xl(([,,m])=>m).right(o,d);if(h===o.length)return e.every(lo(u/T2,c/T2,f));if(h===0)return Zl.every(Math.max(lo(u,c,f),1));const[p,g]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return p.every(g)}return[a,l]}const[tq,nq]=U4(Ir,jc,Ql,j4,Vh,Hh),[iq,rq]=U4(Lr,Bc,Kl,ks,Gh,Wh),nn="year",Zn="quarter",gn="month",It="week",Kn="date",mn="day",zr="dayofyear",pi="hours",gi="minutes",Fi="seconds",Ji="milliseconds",M2=[nn,Zn,gn,It,Kn,mn,zr,pi,gi,Fi,Ji],F2=M2.reduce((e,t,n)=>(e[t]=1+n,e),{});function D2(e){const t=ee(e).slice(),n={};return t.length||U("Missing time unit."),t.forEach(r=>{pe(F2,r)?n[r]=1:U(`Invalid time unit: ${r}.`)}),(n[It]||n[mn]?1:0)+(n[Zn]||n[gn]||n[Kn]?1:0)+(n[zr]?1:0)>1&&U(`Incompatible time units: ${e}`),t.sort((r,s)=>F2[r]-F2[s]),t}const sq={[nn]:"%Y ",[Zn]:"Q%q ",[gn]:"%b ",[Kn]:"%d ",[It]:"W%U ",[mn]:"%a ",[zr]:"%j ",[pi]:"%H:00",[gi]:"00:%M",[Fi]:":%S",[Ji]:".%L",[`${nn}-${gn}`]:"%Y-%m ",[`${nn}-${gn}-${Kn}`]:"%Y-%m-%d ",[`${pi}-${gi}`]:"%H:%M"};function q4(e,t){const n=Fe({},sq,t),i=D2(e),r=i.length;let s="",o=0,a,l;for(o=0;o<r;)for(a=i.length;a>o;--a)if(l=i.slice(o,a).join("-"),n[l]!=null){s+=n[l],o=a;break}return s.trim()}const va=new Date;function N2(e){return va.setFullYear(e),va.setMonth(0),va.setDate(1),va.setHours(0,0,0,0),va}function W4(e){return G4(new Date(e))}function H4(e){return O2(new Date(e))}function G4(e){return ks.count(N2(e.getFullYear())-1,e)}function O2(e){return Kl.count(N2(e.getFullYear())-1,e)}function R2(e){return N2(e).getDay()}function oq(e,t,n,i,r,s,o){if(0<=e&&e<100){const a=new Date(-1,t,n,i,r,s,o);return a.setFullYear(e),a}return new Date(e,t,n,i,r,s,o)}function V4(e){return Y4(new Date(e))}function X4(e){return L2(new Date(e))}function Y4(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return uo.count(t-1,e)}function L2(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Ql.count(t-1,e)}function I2(e){return va.setTime(Date.UTC(e,0,1)),va.getUTCDay()}function aq(e,t,n,i,r,s,o){if(0<=e&&e<100){const a=new Date(Date.UTC(-1,t,n,i,r,s,o));return a.setUTCFullYear(n.y),a}return new Date(Date.UTC(e,t,n,i,r,s,o))}function Z4(e,t,n,i,r){const s=t||1,o=Ue(e),a=(y,b,v)=>(v=v||y,lq(n[v],i[v],y===o&&s,b)),l=new Date,u=Ki(e),c=u[nn]?a(nn):pn(2012),f=u[gn]?a(gn):u[Zn]?a(Zn):io,d=u[It]&&u[mn]?a(mn,1,It+mn):u[It]?a(It,1):u[mn]?a(mn,1):u[Kn]?a(Kn,1):u[zr]?a(zr,1):ql,h=u[pi]?a(pi):io,p=u[gi]?a(gi):io,g=u[Fi]?a(Fi):io,m=u[Ji]?a(Ji):io;return function(y){l.setTime(+y);const b=c(l);return r(b,f(l),d(l,b),h(l),p(l),g(l),m(l))}}function lq(e,t,n,i){const r=n<=1?e:i?(s,o)=>i+n*Math.floor((e(s,o)-i)/n):(s,o)=>n*Math.floor(e(s,o)/n);return t?(s,o)=>t(r(s,o),o):r}function tu(e,t,n){return t+e*7-(n+6)%7}const uq={[nn]:e=>e.getFullYear(),[Zn]:e=>Math.floor(e.getMonth()/3),[gn]:e=>e.getMonth(),[Kn]:e=>e.getDate(),[pi]:e=>e.getHours(),[gi]:e=>e.getMinutes(),[Fi]:e=>e.getSeconds(),[Ji]:e=>e.getMilliseconds(),[zr]:e=>G4(e),[It]:e=>O2(e),[It+mn]:(e,t)=>tu(O2(e),e.getDay(),R2(t)),[mn]:(e,t)=>tu(1,e.getDay(),R2(t))},cq={[Zn]:e=>3*e,[It]:(e,t)=>tu(e,0,R2(t))};function K4(e,t){return Z4(e,t||1,uq,cq,oq)}const fq={[nn]:e=>e.getUTCFullYear(),[Zn]:e=>Math.floor(e.getUTCMonth()/3),[gn]:e=>e.getUTCMonth(),[Kn]:e=>e.getUTCDate(),[pi]:e=>e.getUTCHours(),[gi]:e=>e.getUTCMinutes(),[Fi]:e=>e.getUTCSeconds(),[Ji]:e=>e.getUTCMilliseconds(),[zr]:e=>Y4(e),[It]:e=>L2(e),[mn]:(e,t)=>tu(1,e.getUTCDay(),I2(t)),[It+mn]:(e,t)=>tu(L2(e),e.getUTCDay(),I2(t))},dq={[Zn]:e=>3*e,[It]:(e,t)=>tu(e,0,I2(t))};function J4(e,t){return Z4(e,t||1,fq,dq,aq)}const hq={[nn]:Lr,[Zn]:Bc.every(3),[gn]:Bc,[It]:Kl,[Kn]:ks,[mn]:ks,[zr]:ks,[pi]:Gh,[gi]:Wh,[Fi]:ws,[Ji]:Zl},pq={[nn]:Ir,[Zn]:jc.every(3),[gn]:jc,[It]:Ql,[Kn]:uo,[mn]:uo,[zr]:uo,[pi]:Vh,[gi]:Hh,[Fi]:ws,[Ji]:Zl};function nu(e){return hq[e]}function iu(e){return pq[e]}function Q4(e,t,n){return e?e.offset(t,n):void 0}function e8(e,t,n){return Q4(nu(e),t,n)}function t8(e,t,n){return Q4(iu(e),t,n)}function n8(e,t,n,i){return e?e.range(t,n,i):void 0}function i8(e,t,n,i){return n8(nu(e),t,n,i)}function r8(e,t,n,i){return n8(iu(e),t,n,i)}const Uc=1e3,qc=Uc*60,Wc=qc*60,Zh=Wc*24,gq=Zh*7,s8=Zh*30,z2=Zh*365,o8=[nn,gn,Kn,pi,gi,Fi,Ji],Hc=o8.slice(0,-1),Gc=Hc.slice(0,-1),Vc=Gc.slice(0,-1),mq=Vc.slice(0,-1),yq=[nn,It],a8=[nn,gn],l8=[nn],Xc=[[Hc,1,Uc],[Hc,5,5*Uc],[Hc,15,15*Uc],[Hc,30,30*Uc],[Gc,1,qc],[Gc,5,5*qc],[Gc,15,15*qc],[Gc,30,30*qc],[Vc,1,Wc],[Vc,3,3*Wc],[Vc,6,6*Wc],[Vc,12,12*Wc],[mq,1,Zh],[yq,1,gq],[a8,1,s8],[a8,3,3*s8],[l8,1,z2]];function u8(e){const t=e.extent,n=e.maxbins||40,i=Math.abs(Lc(t))/n;let r=Xl(a=>a[2]).right(Xc,i),s,o;return r===Xc.length?(s=l8,o=lo(t[0]/z2,t[1]/z2,n)):r?(r=Xc[i/Xc[r-1][2]<Xc[r][2]/i?r-1:r],s=r[0],o=r[1]):(s=o8,o=Math.max(lo(t[0],t[1],n),1)),{units:s,step:o}}function P2(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function B2(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Yc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function c8(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,s=e.days,o=e.shortDays,a=e.months,l=e.shortMonths,u=Zc(r),c=Kc(r),f=Zc(s),d=Kc(s),h=Zc(o),p=Kc(o),g=Zc(a),m=Kc(a),y=Zc(l),b=Kc(l),v={a:P,A:j,b:W,B:ne,c:null,d:m8,e:m8,f:Bq,g:Zq,G:Jq,H:Iq,I:zq,j:Pq,L:y8,m:jq,M:Uq,p:ae,q:ke,Q:k8,s:$8,S:qq,u:Wq,U:Hq,V:Gq,w:Vq,W:Xq,x:null,X:null,y:Yq,Y:Kq,Z:Qq,"%":w8},x={a:Ie,A:Le,b:We,B:Wn,c:null,d:v8,e:v8,f:iW,g:hW,G:gW,H:eW,I:tW,j:nW,L:x8,m:rW,M:sW,p:Mr,q:Vi,Q:k8,s:$8,S:oW,u:aW,U:lW,V:uW,w:cW,W:fW,x:null,X:null,y:dW,Y:pW,Z:mW,"%":w8},_={a:E,A,b:R,B:C,c:M,d:p8,e:p8,f:Nq,g:h8,G:d8,H:g8,I:g8,j:Tq,L:Dq,m:Aq,M:Mq,p:S,q:Sq,Q:Rq,s:Lq,S:Fq,u:wq,U:kq,V:$q,w:_q,W:Eq,x:T,X:O,y:h8,Y:d8,Z:Cq,"%":Oq};v.x=k(n,v),v.X=k(i,v),v.c=k(t,v),x.x=k(n,x),x.X=k(i,x),x.c=k(t,x);function k(se,Te){return function(De){var V=[],qt=-1,He=0,Cn=se.length,Hn,Rl,az;for(De instanceof Date||(De=new Date(+De));++qt<Cn;)se.charCodeAt(qt)===37&&(V.push(se.slice(He,qt)),(Rl=f8[Hn=se.charAt(++qt)])!=null?Hn=se.charAt(++qt):Rl=Hn==="e"?" ":"0",(az=Te[Hn])&&(Hn=az(De,Rl)),V.push(Hn),He=qt+1);return V.push(se.slice(He,qt)),V.join("")}}function w(se,Te){return function(De){var V=Yc(1900,void 0,1),qt=$(V,se,De+="",0),He,Cn;if(qt!=De.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(Te&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(He=B2(Yc(V.y,0,1)),Cn=He.getUTCDay(),He=Cn>4||Cn===0?Yh.ceil(He):Yh(He),He=uo.offset(He,(V.V-1)*7),V.y=He.getUTCFullYear(),V.m=He.getUTCMonth(),V.d=He.getUTCDate()+(V.w+6)%7):(He=P2(Yc(V.y,0,1)),Cn=He.getDay(),He=Cn>4||Cn===0?Xh.ceil(He):Xh(He),He=ks.offset(He,(V.V-1)*7),V.y=He.getFullYear(),V.m=He.getMonth(),V.d=He.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Cn="Z"in V?B2(Yc(V.y,0,1)).getUTCDay():P2(Yc(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Cn+5)%7:V.w+V.U*7-(Cn+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,B2(V)):P2(V)}}function $(se,Te,De,V){for(var qt=0,He=Te.length,Cn=De.length,Hn,Rl;qt<He;){if(V>=Cn)return-1;if(Hn=Te.charCodeAt(qt++),Hn===37){if(Hn=Te.charAt(qt++),Rl=_[Hn in f8?Te.charAt(qt++):Hn],!Rl||(V=Rl(se,De,V))<0)return-1}else if(Hn!=De.charCodeAt(V++))return-1}return V}function S(se,Te,De){var V=u.exec(Te.slice(De));return V?(se.p=c.get(V[0].toLowerCase()),De+V[0].length):-1}function E(se,Te,De){var V=h.exec(Te.slice(De));return V?(se.w=p.get(V[0].toLowerCase()),De+V[0].length):-1}function A(se,Te,De){var V=f.exec(Te.slice(De));return V?(se.w=d.get(V[0].toLowerCase()),De+V[0].length):-1}function R(se,Te,De){var V=y.exec(Te.slice(De));return V?(se.m=b.get(V[0].toLowerCase()),De+V[0].length):-1}function C(se,Te,De){var V=g.exec(Te.slice(De));return V?(se.m=m.get(V[0].toLowerCase()),De+V[0].length):-1}function M(se,Te,De){return $(se,t,Te,De)}function T(se,Te,De){return $(se,n,Te,De)}function O(se,Te,De){return $(se,i,Te,De)}function P(se){return o[se.getDay()]}function j(se){return s[se.getDay()]}function W(se){return l[se.getMonth()]}function ne(se){return a[se.getMonth()]}function ae(se){return r[+(se.getHours()>=12)]}function ke(se){return 1+~~(se.getMonth()/3)}function Ie(se){return o[se.getUTCDay()]}function Le(se){return s[se.getUTCDay()]}function We(se){return l[se.getUTCMonth()]}function Wn(se){return a[se.getUTCMonth()]}function Mr(se){return r[+(se.getUTCHours()>=12)]}function Vi(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var Te=k(se+="",v);return Te.toString=function(){return se},Te},parse:function(se){var Te=w(se+="",!1);return Te.toString=function(){return se},Te},utcFormat:function(se){var Te=k(se+="",x);return Te.toString=function(){return se},Te},utcParse:function(se){var Te=w(se+="",!0);return Te.toString=function(){return se},Te}}}var f8={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,bq=/^%/,vq=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(t)+r:r)}function xq(e){return e.replace(vq,"\\$&")}function Zc(e){return new RegExp("^(?:"+e.map(xq).join("|")+")","i")}function Kc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function _q(e,t,n){var i=Wt.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function wq(e,t,n){var i=Wt.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function kq(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function $q(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function Eq(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function d8(e,t,n){var i=Wt.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function h8(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Cq(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Sq(e,t,n){var i=Wt.exec(t.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Aq(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function p8(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Tq(e,t,n){var i=Wt.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function g8(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Mq(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Fq(e,t,n){var i=Wt.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Dq(e,t,n){var i=Wt.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Nq(e,t,n){var i=Wt.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Oq(e,t,n){var i=bq.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function Rq(e,t,n){var i=Wt.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Lq(e,t,n){var i=Wt.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function m8(e,t){return Ze(e.getDate(),t,2)}function Iq(e,t){return Ze(e.getHours(),t,2)}function zq(e,t){return Ze(e.getHours()%12||12,t,2)}function Pq(e,t){return Ze(1+ks.count(Lr(e),e),t,3)}function y8(e,t){return Ze(e.getMilliseconds(),t,3)}function Bq(e,t){return y8(e,t)+"000"}function jq(e,t){return Ze(e.getMonth()+1,t,2)}function Uq(e,t){return Ze(e.getMinutes(),t,2)}function qq(e,t){return Ze(e.getSeconds(),t,2)}function Wq(e){var t=e.getDay();return t===0?7:t}function Hq(e,t){return Ze(Kl.count(Lr(e)-1,e),t,2)}function b8(e){var t=e.getDay();return t>=4||t===0?Jl(e):Jl.ceil(e)}function Gq(e,t){return e=b8(e),Ze(Jl.count(Lr(e),e)+(Lr(e).getDay()===4),t,2)}function Vq(e){return e.getDay()}function Xq(e,t){return Ze(Xh.count(Lr(e)-1,e),t,2)}function Yq(e,t){return Ze(e.getFullYear()%100,t,2)}function Zq(e,t){return e=b8(e),Ze(e.getFullYear()%100,t,2)}function Kq(e,t){return Ze(e.getFullYear()%1e4,t,4)}function Jq(e,t){var n=e.getDay();return e=n>=4||n===0?Jl(e):Jl.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function Qq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function v8(e,t){return Ze(e.getUTCDate(),t,2)}function eW(e,t){return Ze(e.getUTCHours(),t,2)}function tW(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function nW(e,t){return Ze(1+uo.count(Ir(e),e),t,3)}function x8(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function iW(e,t){return x8(e,t)+"000"}function rW(e,t){return Ze(e.getUTCMonth()+1,t,2)}function sW(e,t){return Ze(e.getUTCMinutes(),t,2)}function oW(e,t){return Ze(e.getUTCSeconds(),t,2)}function aW(e){var t=e.getUTCDay();return t===0?7:t}function lW(e,t){return Ze(Ql.count(Ir(e)-1,e),t,2)}function _8(e){var t=e.getUTCDay();return t>=4||t===0?eu(e):eu.ceil(e)}function uW(e,t){return e=_8(e),Ze(eu.count(Ir(e),e)+(Ir(e).getUTCDay()===4),t,2)}function cW(e){return e.getUTCDay()}function fW(e,t){return Ze(Yh.count(Ir(e)-1,e),t,2)}function dW(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function hW(e,t){return e=_8(e),Ze(e.getUTCFullYear()%100,t,2)}function pW(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function gW(e,t){var n=e.getUTCDay();return e=n>=4||n===0?eu(e):eu.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function mW(){return"+0000"}function w8(){return"%"}function k8(e){return+e}function $8(e){return Math.floor(+e/1e3)}var ru,j2,E8,U2,C8;yW({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yW(e){return ru=c8(e),j2=ru.format,E8=ru.parse,U2=ru.utcFormat,C8=ru.utcParse,ru}function Jc(e){const t={};return n=>t[n]||(t[n]=e(n))}function bW(e,t){return n=>{const i=e(n),r=i.indexOf(t);if(r<0)return i;let s=vW(i,r);const o=s<i.length?i.slice(s):"";for(;--s>r;)if(i[s]!=="0"){++s;break}return i.slice(0,s)+o}}function vW(e,t){let n=e.lastIndexOf("e"),i;if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}function S8(e){const t=Jc(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(i){const r=ma(i||",");if(r.precision==null){switch(r.precision=12,r.type){case"%":r.precision-=2;break;case"e":r.precision-=1;break}return bW(t(r),t(".1f")(1)[1])}else return t(r)},formatSpan(i,r,s,o){o=ma(o??",f");const a=lo(i,r,s),l=Math.max(Math.abs(i),Math.abs(r));let u;if(o.precision==null)switch(o.type){case"s":return isNaN(u=z4(a,l))||(o.precision=u),n(o,l);case"":case"e":case"g":case"p":case"r":{isNaN(u=P4(a,l))||(o.precision=u-(o.type==="e"));break}case"f":case"%":{isNaN(u=I4(a))||(o.precision=u-(o.type==="%")*2);break}}return t(o)}}}let q2;A8();function A8(){return q2=S8({format:qh,formatPrefix:E2})}function T8(e){return S8(L4(e))}function Kh(e){return arguments.length?q2=T8(e):q2}function M8(e,t,n){n=n||{},ie(n)||U(`Invalid time multi-format specifier: ${n}`);const i=t(Fi),r=t(gi),s=t(pi),o=t(Kn),a=t(It),l=t(gn),u=t(Zn),c=t(nn),f=e(n[Ji]||".%L"),d=e(n[Fi]||":%S"),h=e(n[gi]||"%I:%M"),p=e(n[pi]||"%I %p"),g=e(n[Kn]||n[mn]||"%a %d"),m=e(n[It]||"%b %d"),y=e(n[gn]||"%B"),b=e(n[Zn]||"%B"),v=e(n[nn]||"%Y");return x=>(i(x)<x?f:r(x)<x?d:s(x)<x?h:o(x)<x?p:l(x)<x?a(x)<x?g:m:c(x)<x?u(x)<x?y:b:v)(x)}function F8(e){const t=Jc(e.format),n=Jc(e.utcFormat);return{timeFormat:i=>te(i)?t(i):M8(t,nu,i),utcFormat:i=>te(i)?n(i):M8(n,iu,i),timeParse:Jc(e.parse),utcParse:Jc(e.utcParse)}}let W2;D8();function D8(){return W2=F8({format:j2,parse:E8,utcFormat:U2,utcParse:C8})}function N8(e){return F8(c8(e))}function Qc(e){return arguments.length?W2=N8(e):W2}const H2=(e,t)=>Fe({},e,t);function O8(e,t){const n=e?T8(e):Kh(),i=t?N8(t):Qc();return H2(n,i)}function G2(e,t){const n=arguments.length;return n&&n!==2&&U("defaultLocale expects either zero or two arguments."),n?H2(Kh(e),Qc(t)):H2(Kh(),Qc())}function xW(){return A8(),D8(),G2()}const _W=/^(data:|([A-Za-z]+:)?\/\/)/,wW=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,kW=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,R8="file://";function $W(e,t){return n=>({options:n||{},sanitize:CW,load:EW,fileAccess:!!t,file:SW(t),http:TW(e)})}async function EW(e,t){const n=await this.sanitize(e,t),i=n.href;return n.localFile?this.file(i):this.http(i,t)}async function CW(e,t){t=Fe({},this.options,t);const n=this.fileAccess,i={href:null};let r,s,o;const a=wW.test(e.replace(kW,""));(e==null||typeof e!="string"||!a)&&U("Sanitize failure, invalid URI: "+J(e));const l=_W.test(e);return(o=t.baseURL)&&!l&&(!e.startsWith("/")&&!o.endsWith("/")&&(e="/"+e),e=o+e),s=(r=e.startsWith(R8))||t.mode==="file"||t.mode!=="http"&&!l&&n,r?e=e.slice(R8.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),s=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(i,"localFile",{value:!!s}),i.href=e,t.target&&(i.target=t.target+""),t.rel&&(i.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(i.crossOrigin=t.crossOrigin+""),i}function SW(e){return e?t=>new Promise((n,i)=>{e.readFile(t,(r,s)=>{r?i(r):n(s)})}):AW}async function AW(){U("No file system access.")}function TW(e){return e?async function(t,n){const i=Fe({},this.options.http,n),r=n&&n.response,s=await e(t,i);return s.ok?Me(s[r])?s[r]():s.text():U(s.status+""+s.statusText)}:MW}async function MW(){U("No HTTP fetch method available.")}const FW=e=>e!=null&&e===e,DW=e=>e==="true"||e==="false"||e===!0||e===!1,NW=e=>!Number.isNaN(Date.parse(e)),L8=e=>!Number.isNaN(+e)&&!(e instanceof Date),OW=e=>L8(e)&&Number.isInteger(+e),V2={boolean:h2,integer:hn,number:hn,date:p2,string:g2,unknown:dn},Jh=[DW,OW,L8,NW],RW=["boolean","integer","number","date"];function I8(e,t){if(!e||!e.length)return"unknown";const n=e.length,i=Jh.length,r=Jh.map((s,o)=>o+1);for(let s=0,o=0,a,l;s<n;++s)for(l=t?e[s][t]:e[s],a=0;a<i;++a)if(r[a]&&FW(l)&&!Jh[a](l)&&(r[a]=0,++o,o===Jh.length))return"string";return RW[r.reduce((s,o)=>s===0?o:s,0)-1]}function z8(e,t){return t.reduce((n,i)=>(n[i]=I8(e,i),n),{})}function P8(e){const t=function(n,i){const r={delimiter:e};return X2(n,i?Fe(i,r):r)};return t.responseType="text",t}function X2(e,t){return t.header&&(e=t.header.map(J).join(t.delimiter)+`
|
|
66
|
+
`+e),gU(t.delimiter).parse(e+"")}X2.responseType="text";function LW(e){return typeof Buffer=="function"&&Me(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function Y2(e,t){const n=t&&t.property?Ai(t.property):dn;return ie(e)&&!LW(e)?IW(n(e),t):n(JSON.parse(e))}Y2.responseType="json";function IW(e,t){return!q(e)&&o4(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const zW={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function B8(e,t){let n,i,r,s;return e=Y2(e,t),t&&t.feature?(n=vU,r=t.feature):t&&t.mesh?(n=_U,r=t.mesh,s=zW[t.filter]):U("Missing TopoJSON feature or mesh parameter."),i=(i=e.objects[r])?n(e,i,s):U("Invalid TopoJSON object: "+r),i&&i.features||[i]}B8.responseType="json";const Qh={dsv:X2,csv:P8(","),tsv:P8(" "),json:Y2,topojson:B8};function Z2(e,t){return arguments.length>1?(Qh[e]=t,this):pe(Qh,e)?Qh[e]:null}function j8(e){const t=Z2(e);return t&&t.responseType||"text"}function U8(e,t,n,i){t=t||{};const r=Z2(t.type||"json");return r||U("Unknown data format type: "+t.type),e=r(e,t),t.parse&&PW(e,t.parse,n,i),pe(e,"columns")&&delete e.columns,e}function PW(e,t,n,i){if(!e.length)return;const r=Qc();n=n||r.timeParse,i=i||r.utcParse;let s=e.columns||Object.keys(e[0]),o,a,l,u,c,f;t==="auto"&&(t=z8(e,s)),s=Object.keys(t);const d=s.map(h=>{const p=t[h];let g,m;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return g=p.split(/:(.+)?/,2),m=g[1],(m[0]==="'"&&m[m.length-1]==="'"||m[0]==='"'&&m[m.length-1]==='"')&&(m=m.slice(1,-1)),(g[0]==="utc"?i:n)(m);if(!V2[p])throw Error("Illegal format pattern: "+h+":"+p);return V2[p]});for(l=0,c=e.length,f=s.length;l<c;++l)for(o=e[l],u=0;u<f;++u)a=s[u],o[a]=d[u](o[a])}const ep=$W(typeof fetch<"u"&&fetch,null);function tp(e){const t=e||dn,n=[],i={};return n.add=r=>{const s=t(r);return i[s]||(i[s]=1,n.push(r)),n},n.remove=r=>{const s=t(r);if(i[s]){i[s]=0;const o=n.indexOf(r);o>=0&&n.splice(o,1)}return n},n}async function np(e,t){try{await t(e)}catch(n){e.error(n)}}const q8=Symbol("vega_id");let BW=1;function ip(e){return!!(e&&ge(e))}function ge(e){return e[q8]}function W8(e,t){return e[q8]=t,e}function et(e){const t=e===Object(e)?e:{data:e};return ge(t)?t:W8(t,BW++)}function K2(e){return rp(e,et({}))}function rp(e,t){for(const n in e)t[n]=e[n];return t}function H8(e,t){return W8(t,ge(e))}function xa(e,t){return e?t?(n,i)=>e(n,i)||ge(t(n))-ge(t(i)):(n,i)=>e(n,i)||ge(n)-ge(i):null}function G8(e){return e&&e.constructor===_a}function _a(){const e=[],t=[],n=[],i=[],r=[];let s=null,o=!1;return{constructor:_a,insert(a){const l=ee(a),u=l.length;for(let c=0;c<u;++c)e.push(l[c]);return this},remove(a){const l=Me(a)?i:t,u=ee(a),c=u.length;for(let f=0;f<c;++f)l.push(u[f]);return this},modify(a,l,u){const c={field:l,value:pn(u)};return Me(a)?(c.filter=a,r.push(c)):(c.tuple=a,n.push(c)),this},encode(a,l){return Me(a)?r.push({filter:a,field:l}):n.push({tuple:a,field:l}),this},clean(a){return s=a,this},reflow(){return o=!0,this},pulse(a,l){const u={},c={};let f,d,h,p,g,m;for(f=0,d=l.length;f<d;++f)u[ge(l[f])]=1;for(f=0,d=t.length;f<d;++f)g=t[f],u[ge(g)]=-1;for(f=0,d=i.length;f<d;++f)p=i[f],l.forEach(b=>{p(b)&&(u[ge(b)]=-1)});for(f=0,d=e.length;f<d;++f)g=e[f],m=ge(g),u[m]?u[m]=1:a.add.push(et(e[f]));for(f=0,d=l.length;f<d;++f)g=l[f],u[ge(g)]<0&&a.rem.push(g);function y(b,v,x){x?b[v]=x(b):a.encode=v,o||(c[ge(b)]=b)}for(f=0,d=n.length;f<d;++f)h=n[f],g=h.tuple,p=h.field,m=u[ge(g)],m>0&&(y(g,p,h.value),a.modifies(p));for(f=0,d=r.length;f<d;++f)h=r[f],p=h.filter,l.forEach(b=>{p(b)&&u[ge(b)]>0&&y(b,h.field,h.value)}),a.modifies(h.field);if(o)a.mod=t.length||i.length?l.filter(b=>u[ge(b)]>0):l.slice();else for(m in c)a.mod.push(c[m]);return(s||s==null&&(t.length||i.length))&&a.clean(!0),a}}}const sp="_:mod:_";function op(){Object.defineProperty(this,sp,{writable:!0,value:{}})}op.prototype={set(e,t,n,i){const r=this,s=r[e],o=r[sp];return t!=null&&t>=0?(s[t]!==n||i)&&(s[t]=n,o[t+":"+e]=-1,o[e]=-1):(s!==n||i)&&(r[e]=n,o[e]=q(n)?1+n.length:-1),r},modified(e,t){const n=this[sp];if(arguments.length){if(q(e)){for(let i=0;i<e.length;++i)if(n[e[i]])return!0;return!1}}else{for(const i in n)if(n[i])return!0;return!1}return t!=null&&t>=0?t+1<n[e]||!!n[t+":"+e]:!!n[e]},clear(){return this[sp]={},this}};let jW=0;const UW="pulse",qW=new op,WW=1,HW=2;function gt(e,t,n,i){this.id=++jW,this.value=e,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,t&&(this._update=t),n&&this.parameters(n,i)}function V8(e){return function(t){const n=this.flags;return arguments.length===0?!!(n&e):(this.flags=t?n|e:n&~e,this)}}gt.prototype={targets(){return this._targets||(this._targets=tp(Oc))},set(e){return this.value!==e?(this.value=e,1):0},skip:V8(WW),modified:V8(HW),parameters(e,t,n){t=t!==!1;const i=this._argval=this._argval||new op,r=this._argops=this._argops||[],s=[];let o,a,l,u;const c=(f,d,h)=>{h instanceof gt?(h!==this&&(t&&h.targets().add(this),s.push(h)),r.push({op:h,name:f,index:d})):i.set(f,d,h)};for(o in e)if(a=e[o],o===UW)ee(a).forEach(f=>{f instanceof gt?f!==this&&(f.targets().add(this),s.push(f)):U("Pulse parameters must be operator instances.")}),this.source=a;else if(q(a))for(i.set(o,-1,Array(l=a.length)),u=0;u<l;++u)c(o,u,a[u]);else c(o,-1,a);return this.marshall().clear(),n&&(r.initonly=!0),s},marshall(e){const t=this._argval||qW,n=this._argops;let i,r,s,o;if(n){const a=n.length;for(r=0;r<a;++r)i=n[r],s=i.op,o=s.modified()&&s.stamp===e,t.set(i.name,i.index,s.value,o);if(n.initonly){for(r=0;r<a;++r)i=n[r],i.op.targets().remove(this);this._argops=null,this._update=null}}return t},detach(){const e=this._argops;let t,n,i,r;if(e)for(t=0,n=e.length;t<n;++t)i=e[t],r=i.op,r._targets&&r._targets.remove(this);this.pulse=null,this.source=null},evaluate(e){const t=this._update;if(t){const n=this.marshall(e.stamp),i=t.call(this,n,e);if(n.clear(),i!==this.value)this.value=i;else if(!this.modified())return e.StopPropagation}},run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?(this.skip(!1),t=0):t=this.evaluate(e),this.pulse=t||e}};function GW(e,t,n,i){let r=1,s;return e instanceof gt?s=e:e&&e.prototype instanceof gt?s=new e:Me(e)?s=new gt(null,e):(r=0,s=new gt(e,t)),this.rank(s),r&&(i=n,n=t),n&&this.connect(s,s.parameters(n,i)),this.touch(s),s}function VW(e,t){const n=e.rank,i=t.length;for(let r=0;r<i;++r)if(n<t[r].rank){this.rerank(e);return}}let XW=0;function ap(e,t,n){this.id=++XW,this.value=null,n&&(this.receive=n),e&&(this._filter=e),t&&(this._apply=t)}function co(e,t,n){return new ap(e,t,n)}ap.prototype={_filter:Ti,_apply:dn,targets(){return this._targets||(this._targets=tp(Oc))},consume(e){return arguments.length?(this._consume=!!e,this):!!this._consume},receive(e){if(this._filter(e)){const t=this.value=this._apply(e),n=this._targets,i=n?n.length:0;for(let r=0;r<i;++r)n[r].receive(t);this._consume&&(e.preventDefault(),e.stopPropagation())}},filter(e){const t=co(e);return this.targets().add(t),t},apply(e){const t=co(null,e);return this.targets().add(t),t},merge(){const e=co();this.targets().add(e);for(let t=0,n=arguments.length;t<n;++t)arguments[t].targets().add(e);return e},throttle(e){let t=-1;return this.filter(()=>{const n=Date.now();return n-t>e?(t=n,1):0})},debounce(e){const t=co();return this.targets().add(co(null,null,f2(e,n=>{const i=n.dataflow;t.receive(n),i&&i.run&&i.run()}))),t},between(e,t){let n=!1;return e.targets().add(co(null,null,()=>n=!0)),t.targets().add(co(null,null,()=>n=!1)),this.filter(()=>n)},detach(){this._filter=Ti,this._targets=null}};function YW(e,t,n,i){const r=this,s=co(n,i),o=function(u){u.dataflow=r;try{s.receive(u)}catch(c){r.error(c)}finally{r.run()}};let a;typeof e=="string"&&typeof document<"u"?a=document.querySelectorAll(e):a=ee(e);const l=a.length;for(let u=0;u<l;++u)a[u].addEventListener(t,o);return s}function ZW(e,t){const n=this.locale();return U8(e,t,n.timeParse,n.utcParse)}function KW(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))}async function JW(e,t){const n=this;let i=0,r;try{r=await n.loader().load(e,{context:"dataflow",response:j8(t&&t.type)});try{r=n.parse(r,t)}catch(s){i=-2,n.warn("Data ingestion failed",e,s)}}catch(s){i=-1,n.warn("Loading failed",e,s)}return{data:r,status:i}}async function QW(e,t,n){const i=this,r=i._pending||eH(i);r.requests+=1;const s=await i.request(t,n);return i.pulse(e,i.changeset().remove(Ti).insert(s.data||[])),r.done(),s}function eH(e){let t;const n=new Promise(i=>t=i);return n.requests=0,n.done=()=>{--n.requests===0&&(e._pending=null,t(e))},e._pending=n}const tH={skip:!0};function nH(e,t,n,i,r){return(e instanceof gt?rH:iH)(this,e,t,n,i,r),this}function iH(e,t,n,i,r,s){const o=Fe({},s,tH);let a,l;Me(n)||(n=pn(n)),i===void 0?a=u=>e.touch(n(u)):Me(i)?(l=new gt(null,i,r,!1),a=u=>{l.evaluate(u);const c=n(u),f=l.value;G8(f)?e.pulse(c,f,s):e.update(c,f,o)}):a=u=>e.update(n(u),i,o),t.apply(a)}function rH(e,t,n,i,r,s){if(i===void 0)t.targets().add(n);else{const o=s||{},a=new gt(null,sH(n,i),r,!1);a.modified(o.force),a.rank=t.rank,t.targets().add(a),n&&(a.skip(!0),a.value=n.value,a.targets().add(n),e.connect(n,[a]))}}function sH(e,t){return t=Me(t)?t:pn(t),e?function(n,i){const r=t(n,i);return e.skip()||(e.skip(r!==this.value).value=r),r}:t}function oH(e){e.rank=++this._rank}function aH(e){const t=[e];let n,i,r;for(;t.length;)if(this.rank(n=t.pop()),i=n._targets)for(r=i.length;--r>=0;)t.push(n=i[r]),n===e&&U("Cycle detected in dataflow graph.")}const lp={},Pr=1,fo=2,$s=4,lH=Pr|fo,X8=Pr|$s,su=Pr|fo|$s,Y8=8,ef=16,Z8=32,K8=64;function ho(e,t,n){this.dataflow=e,this.stamp=t??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function J2(e,t){const n=[];return ao(e,t,i=>n.push(i)),n}function J8(e,t){const n={};return e.visit(t,i=>{n[ge(i)]=1}),i=>n[ge(i)]?null:i}function up(e,t){return e?(n,i)=>e(n,i)&&t(n,i):t}ho.prototype={StopPropagation:lp,ADD:Pr,REM:fo,MOD:$s,ADD_REM:lH,ADD_MOD:X8,ALL:su,REFLOW:Y8,SOURCE:ef,NO_SOURCE:Z8,NO_FIELDS:K8,fork(e){return new ho(this.dataflow).init(this,e)},clone(){const e=this.fork(su);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(su|ef)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new ho(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,e.fields&&!(t&K8)&&(n.fields=e.fields),t&Pr?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),t&fo?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),t&$s?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),t&Z8?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||su;return t&Pr&&this.add.length||t&fo&&this.rem.length||t&$s&&this.mod.length},reflow(e){if(e)return this.fork(su).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter($s,J8(this,Pr))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return q(e)?e.forEach(n=>t[n]=!0):t[e]=!0,this},modified(e,t){const n=this.fields;return(t||this.mod.length)&&n?arguments.length?q(e)?e.some(i=>n[i]):n[e]:!!n:!1},filter(e,t){const n=this;return e&Pr&&(n.addF=up(n.addF,t)),e&fo&&(n.remF=up(n.remF,t)),e&$s&&(n.modF=up(n.modF,t)),e&ef&&(n.srcF=up(n.srcF,t)),n},materialize(e){e=e||su;const t=this;return e&Pr&&t.addF&&(t.add=J2(t.add,t.addF),t.addF=null),e&fo&&t.remF&&(t.rem=J2(t.rem,t.remF),t.remF=null),e&$s&&t.modF&&(t.mod=J2(t.mod,t.modF),t.modF=null),e&ef&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,i=t;if(e&ef)return ao(n.source,n.srcF,i),n;e&Pr&&ao(n.add,n.addF,i),e&fo&&ao(n.rem,n.remF,i),e&$s&&ao(n.mod,n.modF,i);const r=n.source;if(e&Y8&&r){const s=n.add.length+n.mod.length;s===r.length||(s?ao(r,J8(n,X8),i):ao(r,n.srcF,i))}return n}};function Q2(e,t,n,i){const r=this;let s=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=i||null,this.pulses=n;for(const o of n)if(o.stamp===t){if(o.fields){const a=r.fields||(r.fields={});for(const l in o.fields)a[l]=1}o.changed(r.ADD)&&(s|=r.ADD),o.changed(r.REM)&&(s|=r.REM),o.changed(r.MOD)&&(s|=r.MOD)}this.changes=s}K(Q2,ho,{fork(e){const t=new ho(this.dataflow).init(this,e&this.NO_FIELDS);return e!==void 0&&(e&t.ADD&&this.visit(t.ADD,n=>t.add.push(n)),e&t.REM&&this.visit(t.REM,n=>t.rem.push(n)),e&t.MOD&&this.visit(t.MOD,n=>t.mod.push(n))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?q(e)?e.some(i=>n[i]):n[e]:0},filter(){U("MultiPulse does not support filtering.")},materialize(){U("MultiPulse does not support materialization.")},visit(e,t){const n=this,i=n.pulses,r=i.length;let s=0;if(e&n.SOURCE)for(;s<r;++s)i[s].visit(e,t);else for(;s<r;++s)i[s].stamp===n.stamp&&i[s].visit(e,t);return n}});async function uH(e,t,n){const i=this,r=[];if(i._pulse)return Q8(i);if(i._pending&&await i._pending,t&&await np(i,t),!i._touched.length)return i.debug("Dataflow invoked, but nothing to do."),i;const s=++i._clock;i._pulse=new ho(i,s,e),i._touched.forEach(c=>i._enqueue(c,!0)),i._touched=tp(Oc);let o=0,a,l,u;try{for(;i._heap.size()>0;){if(a=i._heap.pop(),a.rank!==a.qrank){i._enqueue(a,!0);continue}l=a.run(i._getPulse(a,e)),l.then?l=await l:l.async&&(r.push(l.async),l=lp),l!==lp&&a._targets&&a._targets.forEach(c=>i._enqueue(c)),++o}}catch(c){i._heap.clear(),u=c}if(i._input={},i._pulse=null,i.debug(`Pulse ${s}: ${o} operators`),u&&(i._postrun=[],i.error(u)),i._postrun.length){const c=i._postrun.sort((f,d)=>d.priority-f.priority);i._postrun=[];for(let f=0;f<c.length;++f)await np(i,c[f].callback)}return n&&await np(i,n),r.length&&Promise.all(r).then(c=>i.runAsync(null,()=>{c.forEach(f=>{try{f(i)}catch(d){i.error(d)}})})),i}async function cH(e,t,n){for(;this._running;)await this._running;const i=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(i,i),this._running}function fH(e,t,n){return this._pulse?Q8(this):(this.evaluate(e,t,n),this)}function dH(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(i){this.error(i)}}function Q8(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}function hH(e,t){const n=e.stamp<this._clock;n&&(e.stamp=this._clock),(n||t)&&(e.qrank=e.rank,this._heap.push(e))}function pH(e,t){const n=e.source,i=this._clock;return n&&q(n)?new Q2(this,i,n.map(r=>r.pulse),t):this._input[e.id]||gH(this._pulse,n&&n.pulse)}function gH(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==lp&&(e.source=t.source),e)}const ey={skip:!1,force:!1};function mH(e,t){const n=t||ey;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this}function yH(e,t,n){const i=n||ey;return(e.set(t)||i.force)&&this.touch(e,i),this}function bH(e,t,n){this.touch(e,n||ey);const i=new ho(this,this._clock+(this._pulse?0:1)),r=e.pulse&&e.pulse.source||[];return i.target=e,this._input[e.id]=t.pulse(i,r),this}function vH(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),ek(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let i;return t.length?(i=t[0],t[0]=n,xH(t,0,e)):i=n,i}}}function ek(e,t,n,i){let r,s;const o=e[n];for(;n>t;){if(s=n-1>>1,r=e[s],i(o,r)<0){e[n]=r,n=s;continue}break}return e[n]=o}function xH(e,t,n){const i=t,r=e.length,s=e[t];let o=(t<<1)+1,a;for(;o<r;)a=o+1,a<r&&n(e[o],e[a])>=0&&(o=a),e[t]=e[o],t=o,o=(t<<1)+1;return e[t]=s,ek(e,i,t,n)}function ou(){this.logger(o2()),this.logLevel(r2),this._clock=0,this._rank=0,this._locale=G2();try{this._loader=ep()}catch{}this._touched=tp(Oc),this._input={},this._pulse=null,this._heap=vH((e,t)=>e.qrank-t.qrank),this._postrun=[]}function tf(e){return function(){return this._log[e].apply(this,arguments)}}ou.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:tf("error"),warn:tf("warn"),info:tf("info"),debug:tf("debug"),logLevel:tf("level"),cleanThreshold:1e4,add:GW,connect:VW,rank:oH,rerank:aH,pulse:bH,touch:mH,update:yH,changeset:_a,ingest:KW,parse:ZW,preload:QW,request:JW,events:YW,on:nH,evaluate:uH,run:fH,runAsync:cH,runAfter:dH,_enqueue:hH,_getPulse:pH};function I(e,t){gt.call(this,e,null,t)}K(I,gt,{run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?this.skip(!1):t=this.evaluate(e),t=t||e,t.then?t=t.then(n=>this.pulse=n):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const au={};function tk(e){const t=nk(e);return t&&t.Definition||null}function nk(e){return e=e&&e.toLowerCase(),pe(au,e)?au[e]:null}function*ik(e,t){if(t==null)for(let n of e)n!=null&&n!==""&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)i=t(i,++n,e),i!=null&&i!==""&&(i=+i)>=i&&(yield i)}}function ty(e,t,n){const i=Float64Array.from(ik(e,n));return i.sort(bs),t.map(r=>C4(i,r))}function ny(e,t){return ty(e,[.25,.5,.75],t)}function iy(e,t){const n=e.length,i=TU(e,t),r=ny(e,t),s=(r[2]-r[0])/1.34;return 1.06*(Math.min(i,s)||i||Math.abs(r[0])||1)*Math.pow(n,-.2)}function rk(e){const t=e.maxbins||20,n=e.base||10,i=Math.log(n),r=e.divide||[5,2];let s=e.extent[0],o=e.extent[1],a,l,u,c,f,d;const h=e.span||o-s||Math.abs(s)||1;if(e.step)a=e.step;else if(e.steps){for(c=h/t,f=0,d=e.steps.length;f<d&&e.steps[f]<c;++f);a=e.steps[Math.max(0,f-1)]}else{for(l=Math.ceil(Math.log(t)/i),u=e.minstep||0,a=Math.max(u,Math.pow(n,Math.round(Math.log(h)/i)-l));Math.ceil(h/a)>t;)a*=n;for(f=0,d=r.length;f<d;++f)c=a/r[f],c>=u&&h/c<=t&&(a=c)}c=Math.log(a);const p=c>=0?0:~~(-c/i)+1,g=Math.pow(n,-p-1);return(e.nice||e.nice===void 0)&&(c=Math.floor(s/a+g)*a,s=s<c?c-a:c,o=Math.ceil(o/a)*a),{start:s,stop:o===s?s+a:o,step:a}}var Di=Math.random;function _H(e){Di=e}function sk(e,t,n,i){if(!e.length)return[void 0,void 0];const r=Float64Array.from(ik(e,i)),s=r.length,o=t;let a,l,u,c;for(u=0,c=Array(o);u<o;++u){for(a=0,l=0;l<s;++l)a+=r[~~(Di()*s)];c[u]=a/s}return c.sort(bs),[k2(c,n/2),k2(c,1-n/2)]}function ok(e,t,n,i){i=i||(d=>d);const r=e.length,s=new Float64Array(r);let o=0,a=1,l=i(e[0]),u=l,c=l+t,f;for(;a<r;++a){if(f=i(e[a]),f>=c){for(u=(l+u)/2;o<a;++o)s[o]=u;c=f+t,l=f}u=f}for(u=(l+u)/2;o<a;++o)s[o]=u;return n?wH(s,t+t/4):s}function wH(e,t){const n=e.length;let i=0,r=1,s,o;for(;e[i]===e[r];)++r;for(;r<n;){for(s=r+1;e[r]===e[s];)++s;if(e[r]-e[r-1]<t){for(o=r+(i+s-r-r>>1);o<r;)e[o++]=e[r];for(;o>r;)e[o--]=e[i]}i=r,r=s}return e}function kH(e){return function(){return e=(1103515245*e+12345)%2147483647,e/2147483647}}function $H(e,t){t==null&&(t=e,e=0);let n,i,r;const s={min(o){return arguments.length?(n=o||0,r=i-n,s):n},max(o){return arguments.length?(i=o||0,r=i-n,s):i},sample(){return n+Math.floor(r*Di())},pdf(o){return o===Math.floor(o)&&o>=n&&o<i?1/r:0},cdf(o){const a=Math.floor(o);return a<n?0:a>=i?1:(a-n+1)/r},icdf(o){return o>=0&&o<=1?n-1+Math.floor(o*r):NaN}};return s.min(e).max(t)}const ak=Math.sqrt(2*Math.PI),EH=Math.SQRT2;let nf=NaN;function cp(e,t){e=e||0,t=t??1;let n=0,i=0,r,s;if(nf===nf)n=nf,nf=NaN;else{do n=Di()*2-1,i=Di()*2-1,r=n*n+i*i;while(r===0||r>1);s=Math.sqrt(-2*Math.log(r)/r),n*=s,nf=i*s}return e+n*t}function ry(e,t,n){n=n??1;const i=(e-(t||0))/n;return Math.exp(-.5*i*i)/(n*ak)}function fp(e,t,n){t=t||0,n=n??1;const i=(e-t)/n,r=Math.abs(i);let s;if(r>37)s=0;else{const o=Math.exp(-r*r/2);let a;r<7.07106781186547?(a=.0352624965998911*r+.700383064443688,a=a*r+6.37396220353165,a=a*r+33.912866078383,a=a*r+112.079291497871,a=a*r+221.213596169931,a=a*r+220.206867912376,s=o*a,a=.0883883476483184*r+1.75566716318264,a=a*r+16.064177579207,a=a*r+86.7807322029461,a=a*r+296.564248779674,a=a*r+637.333633378831,a=a*r+793.826512519948,a=a*r+440.413735824752,s=s/a):(a=r+.65,a=r+4/a,a=r+3/a,a=r+2/a,a=r+1/a,s=o/a/2.506628274631)}return i>0?1-s:s}function dp(e,t,n){return e<0||e>1?NaN:(t||0)+(n??1)*EH*CH(2*e-1)}function CH(e){let t=-Math.log((1-e)*(1+e)),n;return t<6.25?(t-=3.125,n=-364441206401782e-35,n=-16850591381820166e-35+n*t,n=128584807152564e-32+n*t,n=11157877678025181e-33+n*t,n=-1333171662854621e-31+n*t,n=20972767875968562e-33+n*t,n=6637638134358324e-30+n*t,n=-4054566272975207e-29+n*t,n=-8151934197605472e-29+n*t,n=26335093153082323e-28+n*t,n=-12975133253453532e-27+n*t,n=-5415412054294628e-26+n*t,n=10512122733215323e-25+n*t,n=-4112633980346984e-24+n*t,n=-29070369957882005e-24+n*t,n=42347877827932404e-23+n*t,n=-13654692000834679e-22+n*t,n=-13882523362786469e-21+n*t,n=.00018673420803405714+n*t,n=-.000740702534166267+n*t,n=-.006033670871430149+n*t,n=.24015818242558962+n*t,n=1.6536545626831027+n*t):t<16?(t=Math.sqrt(t)-3.25,n=22137376921775787e-25,n=9075656193888539e-23+n*t,n=-27517406297064545e-23+n*t,n=18239629214389228e-24+n*t,n=15027403968909828e-22+n*t,n=-4013867526981546e-21+n*t,n=29234449089955446e-22+n*t,n=12475304481671779e-21+n*t,n=-47318229009055734e-21+n*t,n=6828485145957318e-20+n*t,n=24031110387097894e-21+n*t,n=-.0003550375203628475+n*t,n=.0009532893797373805+n*t,n=-.0016882755560235047+n*t,n=.002491442096107851+n*t,n=-.003751208507569241+n*t,n=.005370914553590064+n*t,n=1.0052589676941592+n*t,n=3.0838856104922208+n*t):Number.isFinite(t)?(t=Math.sqrt(t)-5,n=-27109920616438573e-27,n=-2555641816996525e-25+n*t,n=15076572693500548e-25+n*t,n=-3789465440126737e-24+n*t,n=761570120807834e-23+n*t,n=-1496002662714924e-23+n*t,n=2914795345090108e-23+n*t,n=-6771199775845234e-23+n*t,n=22900482228026655e-23+n*t,n=-99298272942317e-20+n*t,n=4526062597223154e-21+n*t,n=-1968177810553167e-20+n*t,n=7599527703001776e-20+n*t,n=-.00021503011930044477+n*t,n=-.00013871931833623122+n*t,n=1.0103004648645344+n*t,n=4.849906401408584+n*t):n=1/0,n*e}function sy(e,t){let n,i;const r={mean(s){return arguments.length?(n=s||0,r):n},stdev(s){return arguments.length?(i=s??1,r):i},sample:()=>cp(n,i),pdf:s=>ry(s,n,i),cdf:s=>fp(s,n,i),icdf:s=>dp(s,n,i)};return r.mean(e).stdev(t)}function oy(e,t){const n=sy();let i=0;const r={data(s){return arguments.length?(e=s,i=s?s.length:0,r.bandwidth(t)):e},bandwidth(s){return arguments.length?(t=s,!t&&e&&(t=iy(e)),r):t},sample(){return e[~~(Di()*i)]+t*n.sample()},pdf(s){let o=0,a=0;for(;a<i;++a)o+=n.pdf((s-e[a])/t);return o/t/i},cdf(s){let o=0,a=0;for(;a<i;++a)o+=n.cdf((s-e[a])/t);return o/i},icdf(){throw Error("KDE icdf not supported.")}};return r.data(e)}function ay(e,t){return e=e||0,t=t??1,Math.exp(e+cp()*t)}function ly(e,t,n){if(e<=0)return 0;t=t||0,n=n??1;const i=(Math.log(e)-t)/n;return Math.exp(-.5*i*i)/(n*ak*e)}function uy(e,t,n){return fp(Math.log(e),t,n)}function cy(e,t,n){return Math.exp(dp(e,t,n))}function lk(e,t){let n,i;const r={mean(s){return arguments.length?(n=s||0,r):n},stdev(s){return arguments.length?(i=s??1,r):i},sample:()=>ay(n,i),pdf:s=>ly(s,n,i),cdf:s=>uy(s,n,i),icdf:s=>cy(s,n,i)};return r.mean(e).stdev(t)}function uk(e,t){let n=0,i;function r(o){const a=[];let l=0,u;for(u=0;u<n;++u)l+=a[u]=o[u]==null?1:+o[u];for(u=0;u<n;++u)a[u]/=l;return a}const s={weights(o){return arguments.length?(i=r(t=o||[]),s):t},distributions(o){return arguments.length?(o?(n=o.length,e=o):(n=0,e=[]),s.weights(t)):e},sample(){const o=Di();let a=e[n-1],l=i[0],u=0;for(;u<n-1;l+=i[++u])if(o<l){a=e[u];break}return a.sample()},pdf(o){let a=0,l=0;for(;l<n;++l)a+=i[l]*e[l].pdf(o);return a},cdf(o){let a=0,l=0;for(;l<n;++l)a+=i[l]*e[l].cdf(o);return a},icdf(){throw Error("Mixture icdf not supported.")}};return s.distributions(e).weights(t)}function fy(e,t){return t==null&&(t=e??1,e=0),e+(t-e)*Di()}function dy(e,t,n){return n==null&&(n=t??1,t=0),e>=t&&e<=n?1/(n-t):0}function hy(e,t,n){return n==null&&(n=t??1,t=0),e<t?0:e>n?1:(e-t)/(n-t)}function py(e,t,n){return n==null&&(n=t??1,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function ck(e,t){let n,i;const r={min(s){return arguments.length?(n=s||0,r):n},max(s){return arguments.length?(i=s??1,r):i},sample:()=>fy(n,i),pdf:s=>dy(s,n,i),cdf:s=>hy(s,n,i),icdf:s=>py(s,n,i)};return t==null&&(t=e??1,e=0),r.min(e).max(t)}function gy(e,t,n){let i=0,r=0;for(const s of e){const o=n(s);t(s)==null||o==null||isNaN(o)||(i+=(o-i)/++r)}return{coef:[i],predict:()=>i,rSquared:0}}function rf(e,t,n,i){const r=i-e*e,s=Math.abs(r)<1e-24?0:(n-e*t)/r;return[t-s*e,s]}function hp(e,t,n,i){e=e.filter(h=>{let p=t(h),g=n(h);return p!=null&&(p=+p)>=p&&g!=null&&(g=+g)>=g}),i&&e.sort((h,p)=>t(h)-t(p));const r=e.length,s=new Float64Array(r),o=new Float64Array(r);let a=0,l=0,u=0,c,f,d;for(d of e)s[a]=c=+t(d),o[a]=f=+n(d),++a,l+=(c-l)/a,u+=(f-u)/a;for(a=0;a<r;++a)s[a]-=l,o[a]-=u;return[s,o,l,u]}function sf(e,t,n,i){let r=-1,s,o;for(const a of e)s=t(a),o=n(a),s!=null&&(s=+s)>=s&&o!=null&&(o=+o)>=o&&i(s,o,++r)}function lu(e,t,n,i,r){let s=0,o=0;return sf(e,t,n,(a,l)=>{const u=l-r(a),c=l-i;s+=u*u,o+=c*c}),1-s/o}function my(e,t,n){let i=0,r=0,s=0,o=0,a=0;sf(e,t,n,(c,f)=>{++a,i+=(c-i)/a,r+=(f-r)/a,s+=(c*f-s)/a,o+=(c*c-o)/a});const l=rf(i,r,s,o),u=c=>l[0]+l[1]*c;return{coef:l,predict:u,rSquared:lu(e,t,n,r,u)}}function fk(e,t,n){let i=0,r=0,s=0,o=0,a=0;sf(e,t,n,(c,f)=>{++a,c=Math.log(c),i+=(c-i)/a,r+=(f-r)/a,s+=(c*f-s)/a,o+=(c*c-o)/a});const l=rf(i,r,s,o),u=c=>l[0]+l[1]*Math.log(c);return{coef:l,predict:u,rSquared:lu(e,t,n,r,u)}}function dk(e,t,n){const[i,r,s,o]=hp(e,t,n);let a=0,l=0,u=0,c=0,f=0,d,h,p;sf(e,t,n,(b,v)=>{d=i[f++],h=Math.log(v),p=d*v,a+=(v*h-a)/f,l+=(p-l)/f,u+=(p*h-u)/f,c+=(d*p-c)/f});const[g,m]=rf(l/o,a/o,u/o,c/o),y=b=>Math.exp(g+m*(b-s));return{coef:[Math.exp(g-m*s),m],predict:y,rSquared:lu(e,t,n,o,y)}}function hk(e,t,n){let i=0,r=0,s=0,o=0,a=0,l=0;sf(e,t,n,(f,d)=>{const h=Math.log(f),p=Math.log(d);++l,i+=(h-i)/l,r+=(p-r)/l,s+=(h*p-s)/l,o+=(h*h-o)/l,a+=(d-a)/l});const u=rf(i,r,s,o),c=f=>u[0]*Math.pow(f,u[1]);return u[0]=Math.exp(u[0]),{coef:u,predict:c,rSquared:lu(e,t,n,a,c)}}function yy(e,t,n){const[i,r,s,o]=hp(e,t,n),a=i.length;let l=0,u=0,c=0,f=0,d=0,h,p,g,m;for(h=0;h<a;)p=i[h],g=r[h++],m=p*p,l+=(m-l)/h,u+=(m*p-u)/h,c+=(m*m-c)/h,f+=(p*g-f)/h,d+=(m*g-d)/h;const y=c-l*l,b=l*y-u*u,v=(d*l-f*u)/b,x=(f*y-d*u)/b,_=-v*l,k=w=>(w=w-s,v*w*w+x*w+_+o);return{coef:[_-x*s+v*s*s+o,x-2*v*s,v],predict:k,rSquared:lu(e,t,n,o,k)}}function pk(e,t,n,i){if(i===0)return gy(e,t,n);if(i===1)return my(e,t,n);if(i===2)return yy(e,t,n);const[r,s,o,a]=hp(e,t,n),l=r.length,u=[],c=[],f=i+1;let d,h,p,g,m;for(d=0;d<f;++d){for(p=0,g=0;p<l;++p)g+=Math.pow(r[p],d)*s[p];for(u.push(g),m=new Float64Array(f),h=0;h<f;++h){for(p=0,g=0;p<l;++p)g+=Math.pow(r[p],d+h);m[h]=g}c.push(m)}c.push(u);const y=AH(c),b=v=>{v-=o;let x=a+y[0]+y[1]*v+y[2]*v*v;for(d=3;d<f;++d)x+=y[d]*Math.pow(v,d);return x};return{coef:SH(f,y,-o,a),predict:b,rSquared:lu(e,t,n,a,b)}}function SH(e,t,n,i){const r=Array(e);let s,o,a,l;for(s=0;s<e;++s)r[s]=0;for(s=e-1;s>=0;--s)for(a=t[s],l=1,r[s]+=a,o=1;o<=s;++o)l*=(s+1-o)/o,r[s-o]+=a*Math.pow(n,o)*l;return r[0]+=i,r}function AH(e){const t=e.length-1,n=[];let i,r,s,o,a;for(i=0;i<t;++i){for(o=i,r=i+1;r<t;++r)Math.abs(e[i][r])>Math.abs(e[i][o])&&(o=r);for(s=i;s<t+1;++s)a=e[s][i],e[s][i]=e[s][o],e[s][o]=a;for(r=i+1;r<t;++r)for(s=t;s>=i;s--)e[s][r]-=e[s][i]*e[i][r]/e[i][i]}for(r=t-1;r>=0;--r){for(a=0,s=r+1;s<t;++s)a+=e[s][r]*n[s];n[r]=(e[t][r]-a)/e[r][r]}return n}const gk=2,mk=1e-12;function yk(e,t,n,i){const[r,s,o,a]=hp(e,t,n,!0),l=r.length,u=Math.max(2,~~(i*l)),c=new Float64Array(l),f=new Float64Array(l),d=new Float64Array(l).fill(1);for(let h=-1;++h<=gk;){const p=[0,u-1];for(let m=0;m<l;++m){const y=r[m],b=p[0],v=p[1],x=y-r[b]>r[v]-y?b:v;let _=0,k=0,w=0,$=0,S=0;const E=1/Math.abs(r[x]-y||1);for(let C=b;C<=v;++C){const M=r[C],T=s[C],O=TH(Math.abs(y-M)*E)*d[C],P=M*O;_+=O,k+=P,w+=T*O,$+=T*P,S+=M*P}const[A,R]=rf(k/_,w/_,$/_,S/_);c[m]=A+R*y,f[m]=Math.abs(s[m]-c[m]),MH(r,m+1,p)}if(h===gk)break;const g=S4(f);if(Math.abs(g)<mk)break;for(let m=0,y,b;m<l;++m)y=f[m]/(6*g),d[m]=y>=1?mk:(b=1-y*y)*b}return FH(r,c,o,a)}function TH(e){return(e=1-e*e*e)*e*e}function MH(e,t,n){const i=e[t];let r=n[0],s=n[1]+1;if(!(s>=e.length))for(;t>r&&e[s]-i<=i-e[r];)n[0]=++r,n[1]=s,++s}function FH(e,t,n,i){const r=e.length,s=[];let o=0,a=0,l=[],u;for(;o<r;++o)u=e[o]+n,l[0]===u?l[1]+=(t[o]-l[1])/++a:(a=0,l[1]+=i,l=[u,t[o]],s.push(l));return l[1]+=i,s}const DH=.5*Math.PI/180;function pp(e,t,n,i){n=n||25,i=Math.max(n,i||200);const r=g=>[g,e(g)],s=t[0],o=t[1],a=o-s,l=a/i,u=[r(s)],c=[];if(n===i){for(let g=1;g<i;++g)u.push(r(s+g/n*a));return u.push(r(o)),u}else{c.push(r(o));for(let g=n;--g>0;)c.push(r(s+g/n*a))}let f=u[0],d=c[c.length-1];const h=1/a,p=NH(f[1],c);for(;d;){const g=r((f[0]+d[0])/2);g[0]-f[0]>=l&&OH(f,g,d,h,p)>DH?c.push(g):(f=d,u.push(d),c.pop()),d=c[c.length-1]}return u}function NH(e,t){let n=e,i=e;const r=t.length;for(let s=0;s<r;++s){const o=t[s][1];o<n&&(n=o),o>i&&(i=o)}return 1/(i-n)}function OH(e,t,n,i,r){const s=Math.atan2(r*(n[1]-e[1]),i*(n[0]-e[0])),o=Math.atan2(r*(t[1]-e[1]),i*(t[0]-e[0]));return Math.abs(s-o)}function RH(e){return t=>{const n=e.length;let i=1,r=String(e[0](t));for(;i<n;++i)r+="|"+e[i](t);return r}}function by(e){return!e||!e.length?function(){return""}:e.length===1?e[0]:RH(e)}function bk(e,t,n){return n||e+(t?"_"+t:"")}const vy=()=>{},LH={init:vy,add:vy,rem:vy,idx:0},of={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.sum,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t<e.min||e.min===void 0)&&(e.min=t)},rem:(e,t)=>{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||e.max===void 0)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t<e.min&&(e.argmin=n)},rem:(e,t)=>{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(e,t)=>{e.exp=0,e.exp_r=t},value:e=>e.valid?e.exp*(1-e.exp_r)/(1-e.exp_r**e.valid):void 0,add:(e,t)=>e.exp=e.exp_r*e.exp+t,rem:(e,t)=>e.exp=(e.exp-t/e.exp_r**(e.valid-1))/e.exp_r},exponentialb:{value:e=>e.valid?e.exp*(1-e.exp_r):void 0,req:["exponential"],idx:1}},af=Object.keys(of).filter(e=>e!=="__count__");function IH(e,t){return(n,i)=>Fe({name:e,aggregate_param:i,out:n||e},LH,t)}[...af,"__count__"].forEach(e=>{of[e]=IH(e,of[e])});function vk(e,t,n){return of[e](n,t)}function xk(e,t){return e.idx-t.idx}function zH(e){const t={};e.forEach(i=>t[i.name]=i);const n=i=>{i.req&&i.req.forEach(r=>{t[r]||n(t[r]=of[r]())})};return e.forEach(n),Object.values(t).sort(xk)}function PH(){this.valid=0,this.missing=0,this._ops.forEach(e=>e.aggregate_param==null?e.init(this):e.init(this,e.aggregate_param))}function BH(e,t){if(e==null||e===""){++this.missing;return}e===e&&(++this.valid,this._ops.forEach(n=>n.add(this,e,t)))}function jH(e,t){if(e==null||e===""){--this.missing;return}e===e&&(--this.valid,this._ops.forEach(n=>n.rem(this,e,t)))}function UH(e){return this._out.forEach(t=>e[t.out]=t.value(this)),e}function _k(e,t){const n=t||dn,i=zH(e),r=e.slice().sort(xk);function s(o){this._ops=i,this._out=r,this.cell=o,this.init()}return s.prototype.init=PH,s.prototype.add=BH,s.prototype.rem=jH,s.prototype.set=UH,s.prototype.get=n,s.fields=e.map(o=>o.out),s}function xy(e){this._key=e?Ai(e):ge,this.reset()}const rn=xy.prototype;rn.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},rn.add=function(e){this._add.push(e)},rn.rem=function(e){this._rem.push(e)},rn.values=function(){if(this._get=null,this._rem.length===0)return this._add;const e=this._add,t=this._rem,n=this._key,i=e.length,r=t.length,s=Array(i-r),o={};let a,l,u;for(a=0;a<r;++a)o[n(t[a])]=1;for(a=0,l=0;a<i;++a)o[n(u=e[a])]?o[n(u)]=0:s[l++]=u;return this._rem=[],this._add=s},rn.distinct=function(e){const t=this.values(),n={};let i=t.length,r=0,s;for(;--i>=0;)s=e(t[i])+"",pe(n,s)||(n[s]=1,++r);return r},rn.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=r4(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},rn.argmin=function(e){return this.extent(e)[0]||{}},rn.argmax=function(e){return this.extent(e)[1]||{}},rn.min=function(e){const t=this.extent(e)[0];return t!=null?e(t):void 0},rn.max=function(e){const t=this.extent(e)[1];return t!=null?e(t):void 0},rn.quartile=function(e){return(this._get!==e||!this._q)&&(this._q=ny(this.values(),e),this._get=e),this._q},rn.q1=function(e){return this.quartile(e)[0]},rn.q2=function(e){return this.quartile(e)[1]},rn.q3=function(e){return this.quartile(e)[2]},rn.ci=function(e){return(this._get!==e||!this._ci)&&(this._ci=sk(this.values(),1e3,.05,e),this._get=e),this._ci},rn.ci0=function(e){return this.ci(e)[0]},rn.ci1=function(e){return this.ci(e)[1]};function po(e){I.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}po.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:af},{name:"aggregate_params",type:"field",null:!0,array:!0,default:[null]},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},K(po,I,{transform(e,t){const n=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.modified();return n.stamp=i.stamp,n.value&&(r||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=r?n.init(e):Object.create(null),t.visit(t.SOURCE,s=>n.add(s))):(n.value=n.value||n.init(e),t.visit(t.REM,s=>n.rem(s)),t.visit(t.ADD,s=>n.add(s))),i.modifies(n._outputs),n._drop=e.drop!==!1,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&i.clean(!0).runAfter(()=>this.clean()),n.changes(i)},cross(){const e=this,t=e.value,n=e._dnames,i=n.map(()=>({})),r=n.length;function s(a){let l,u,c,f;for(l in a)for(c=a[l].tuple,u=0;u<r;++u)i[u][f=c[n[u]]]=f}s(e._prev),s(t);function o(a,l,u){const c=n[u],f=i[u++];for(const d in f){const h=a?a+"|"+d:d;l[c]=f[d],u<r?o(h,l,u):t[h]||e.cell(h,l)}}o("",{},0)},init(e){const t=this._inputs=[],n=this._outputs=[],i={};function r(b){const v=ee(fn(b)),x=v.length;let _=0,k;for(;_<x;++_)i[k=v[_]]||(i[k]=1,t.push(k))}this._dims=ee(e.groupby),this._dnames=this._dims.map(b=>{const v=Et(b);return r(b),n.push(v),v}),this.cellkey=e.key?e.key:by(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const s=e.fields||[null],o=e.ops||["count"],a=e.aggregate_params||[null],l=e.as||[],u=s.length,c={};let f,d,h,p,g,m,y;for(u!==o.length&&U("Unmatched number of fields and aggregate ops."),y=0;y<u;++y){if(f=s[y],d=o[y],h=a[y]||null,f==null&&d!=="count"&&U("Null aggregate field specified."),g=Et(f),m=bk(d,g,l[y]),n.push(m),d==="count"){this._counts.push(m);continue}p=c[g],p||(r(f),p=c[g]=[],p.field=f,this._measures.push(p)),d!=="count"&&(this._countOnly=!1),p.push(vk(d,h,m))}return this._measures=this._measures.map(b=>_k(b,b.field)),Object.create(null)},cellkey:by(),cell(e,t){let n=this.value[e];return n?n.num===0&&this._drop&&n.stamp<this.stamp?(n.stamp=this.stamp,this._adds[this._alen++]=n):n.stamp<this.stamp&&(n.stamp=this.stamp,this._mods[this._mlen++]=n):(n=this.value[e]=this.newcell(e,t),this._adds[this._alen++]=n),n},newcell(e,t){const n={key:e,num:0,agg:null,tuple:this.newtuple(t,this._prev&&this._prev[e]),stamp:this.stamp,store:!1};if(!this._countOnly){const i=this._measures,r=i.length;n.agg=Array(r);for(let s=0;s<r;++s)n.agg[s]=new i[s](n)}return n.store&&(n.data=new xy),n},newtuple(e,t){const n=this._dnames,i=this._dims,r=i.length,s={};for(let o=0;o<r;++o)s[n[o]]=i[o](e);return t?H8(t.tuple,s):et(s)},clean(){const e=this.value;for(const t in e)e[t].num===0&&delete e[t]},add(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num+=1,this._countOnly)return;n.store&&n.data.add(e);const i=n.agg;for(let r=0,s=i.length;r<s;++r)i[r].add(i[r].get(e),e)},rem(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num-=1,this._countOnly)return;n.store&&n.data.rem(e);const i=n.agg;for(let r=0,s=i.length;r<s;++r)i[r].rem(i[r].get(e),e)},celltuple(e){const t=e.tuple,n=this._counts;e.store&&e.data.values();for(let i=0,r=n.length;i<r;++i)t[n[i]]=e.num;if(!this._countOnly){const i=e.agg;for(let r=0,s=i.length;r<s;++r)i[r].set(t)}return t},changes(e){const t=this._adds,n=this._mods,i=this._prev,r=this._drop,s=e.add,o=e.rem,a=e.mod;let l,u,c,f;if(i)for(u in i)l=i[u],(!r||l.num)&&o.push(l.tuple);for(c=0,f=this._alen;c<f;++c)s.push(this.celltuple(t[c])),t[c]=null;for(c=0,f=this._mlen;c<f;++c)l=n[c],(l.num===0&&r?o:a).push(this.celltuple(l)),n[c]=null;return this._alen=this._mlen=0,this._prev=null,e}});const qH=1e-14;function _y(e){I.call(this,null,e)}_y.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]},K(_y,I,{transform(e,t){const n=e.interval!==!1,i=this._bins(e),r=i.start,s=i.step,o=e.as||["bin0","bin1"],a=o[0],l=o[1];let u;return e.modified()?(t=t.reflow(!0),u=t.SOURCE):u=t.modified(fn(e.field))?t.ADD_MOD:t.ADD,t.visit(u,n?c=>{const f=i(c);c[a]=f,c[l]=f==null?null:r+s*(1+(f-r)/s)}:c=>c[a]=i(c)),t.modifies(n?o:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=rk(e),i=n.step;let r=n.start,s=r+Math.ceil((n.stop-r)/i)*i,o,a;(o=e.anchor)!=null&&(a=o-(r+i*Math.floor((o-r)/i)),r+=a,s+=a);const l=function(u){let c=hn(t(u));return c==null?null:c<r?-1/0:c>s?1/0:(c=Math.max(r,Math.min(c,s-i)),r+i*Math.floor(qH+(c-r)/i))};return l.start=r,l.stop=n.stop,l.step=i,this.value=Xn(l,fn(t),e.name||"bin_"+Et(t))}});function wk(e,t,n){const i=e;let r=t||[],s=n||[],o={},a=0;return{add:l=>s.push(l),remove:l=>o[i(l)]=++a,size:()=>r.length,data:(l,u)=>(a&&(r=r.filter(c=>!o[i(c)]),o={},a=0),u&&l&&r.sort(l),s.length&&(r=l?c4(l,r,s.sort(l)):r.concat(s),s=[]),r)}}function wy(e){I.call(this,[],e)}wy.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},K(wy,I,{transform(e,t){const n=t.fork(t.ALL),i=wk(ge,this.value,n.materialize(n.ADD).add),r=e.sort,s=t.changed()||r&&(e.modified("sort")||t.modified(r.fields));return n.visit(n.REM,i.remove),this.modified(s),this.value=n.source=i.data(xa(r),s),t.source&&t.source.root&&(this.value.root=t.source.root),n}});function kk(e){gt.call(this,null,WH,e)}K(kk,gt);function WH(e){return this.value&&!e.modified()?this.value:c2(e.fields,e.orders)}function ky(e){I.call(this,null,e)}ky.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function HH(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break}return e.match(n)}K(ky,I,{transform(e,t){const n=f=>d=>{for(var h=HH(a(d),e.case,s)||[],p,g=0,m=h.length;g<m;++g)o.test(p=h[g])||f(p)},i=this._parameterCheck(e,t),r=this._counts,s=this._match,o=this._stop,a=e.field,l=e.as||["text","count"],u=n(f=>r[f]=1+(r[f]||0)),c=n(f=>r[f]-=1);return i?t.visit(t.SOURCE,u):(t.visit(t.ADD,u),t.visit(t.REM,c)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return(e.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),(e.modified("pattern")||!this._match)&&(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,i=this._tuples||(this._tuples={}),r=t[0],s=t[1],o=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,l,u;for(a in n)l=i[a],u=n[a]||0,!l&&u?(i[a]=l=et({}),l[r]=a,l[s]=u,o.add.push(l)):u===0?(l&&o.rem.push(l),n[a]=null,i[a]=null):l[s]!==u&&(l[s]=u,o.mod.push(l));return o.modifies(t)}});function $y(e){I.call(this,null,e)}$y.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},K($y,I,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.as||["a","b"],r=i[0],s=i[1],o=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return o?(a&&(n.rem=a),a=t.materialize(t.SOURCE).source,n.add=this.value=GH(a,r,s,e.filter||Ti)):n.mod=a,n.source=this.value,n.modifies(i)}});function GH(e,t,n,i){for(var r=[],s={},o=e.length,a=0,l,u;a<o;++a)for(s[t]=u=e[a],l=0;l<o;++l)s[n]=e[l],i(s)&&(r.push(et(s)),s={},s[t]=u);return r}const $k={kde:oy,mixture:uk,normal:sy,lognormal:lk,uniform:ck},VH="distributions",Ek="function",XH="field";function Ck(e,t){const n=e[Ek];pe($k,n)||U("Unknown distribution function: "+n);const i=$k[n]();for(const r in e)r===XH?i.data((e.from||t()).map(e[r])):r===VH?i[r](e[r].map(s=>Ck(s,t))):typeof i[r]===Ek&&i[r](e[r]);return i}function Ey(e){I.call(this,null,e)}const Sk=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],YH={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Sk},{name:"weights",type:"number",array:!0}]};Ey.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Sk.concat(YH)},{name:"as",type:"string",array:!0,default:["value","density"]}]},K(Ey,I,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=Ck(e.distribution,ZH(t)),r=e.steps||e.minsteps||25,s=e.steps||e.maxsteps||200;let o=e.method||"pdf";o!=="pdf"&&o!=="cdf"&&U("Invalid density method: "+o),!e.extent&&!i.data&&U("Missing density extent parameter."),o=i[o];const a=e.as||["value","density"],l=e.extent||Rr(i.data()),u=pp(o,l,r,s).map(c=>{const f={};return f[a[0]]=c[0],f[a[1]]=c[1],et(f)});this.value&&(n.rem=this.value),this.value=n.add=n.source=u}return n}});function ZH(e){return()=>e.materialize(e.SOURCE).source}function Ak(e,t){return e?e.map((n,i)=>t[i]||Et(n)):null}function Cy(e,t,n){const i=[],r=f=>f(l);let s,o,a,l,u,c;if(t==null)i.push(e.map(n));else for(s={},o=0,a=e.length;o<a;++o)l=e[o],u=t.map(r),c=s[u],c||(s[u]=c=[],c.dims=u,i.push(c)),c.push(n(l));return i}const Tk="bin";function Sy(e){I.call(this,null,e)}Sy.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:Tk}]};const KH=(e,t)=>Lc(Rr(e,t))/30;K(Sy,I,{transform(e,t){if(this.value&&!(e.modified()||t.changed()))return t;const n=t.materialize(t.SOURCE).source,i=Cy(t.source,e.groupby,dn),r=e.smooth||!1,s=e.field,o=e.step||KH(n,s),a=xa((p,g)=>s(p)-s(g)),l=e.as||Tk,u=i.length;let c=1/0,f=-1/0,d=0,h;for(;d<u;++d){const p=i[d].sort(a);h=-1;for(const g of ok(p,o,r,s))g<c&&(c=g),g>f&&(f=g),p[++h][l]=g}return this.value={start:c,stop:f,step:o},t.reflow(!0).modifies(l)}});function Mk(e){gt.call(this,null,JH,e),this.modified(!0)}K(Mk,gt);function JH(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:Xn(n=>t(n,e),fn(t),Et(t))}function Ay(e){I.call(this,[void 0,void 0],e)}Ay.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},K(Ay,I,{transform(e,t){const n=this.value,i=e.field,r=t.changed()||t.modified(i.fields)||e.modified("field");let s=n[0],o=n[1];if((r||s==null)&&(s=1/0,o=-1/0),t.visit(r?t.SOURCE:t.ADD,a=>{const l=hn(i(a));l!=null&&(l<s&&(s=l),l>o&&(o=l))}),!Number.isFinite(s)||!Number.isFinite(o)){let a=Et(i);a&&(a=` for field "${a}"`),t.dataflow.warn(`Infinite extent${a}: [${s}, ${o}]`),s=o=void 0}this.value=[s,o]}});function Ty(e,t){gt.call(this,e),this.parent=t,this.count=0}K(Ty,gt,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}});function gp(e){I.call(this,{},e),this._keys=Gl();const t=this._targets=[];t.active=0,t.forEach=n=>{for(let i=0,r=t.active;i<r;++i)n(t[i],i,t)}}K(gp,I,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,i){const r=this.value;let s=pe(r,e)&&r[e],o,a;return s?s.value.stamp<n.stamp&&(s.init(n),this.activate(s)):(a=i||(a=this._group[e])&&a.tuple,o=n.dataflow,s=new Ty(n.fork(n.NO_SOURCE),this),o.add(s).connect(t(o,e,a)),r[e]=s,this.activate(s)),s},clean(){const e=this.value;let t=0;for(const n in e)if(e[n].count===0){const i=e[n].detachSubflow;i&&i(),delete e[n],++t}if(t){const n=this._targets.filter(i=>i&&i.count>0);this.initTargets(n)}},initTargets(e){const t=this._targets,n=t.length,i=e?e.length:0;let r=0;for(;r<i;++r)t[r]=e[r];for(;r<n&&t[r]!=null;++r)t[r]=null;t.active=i},transform(e,t){const n=t.dataflow,i=e.key,r=e.subflow,s=this._keys,o=e.modified("key"),a=l=>this.subflow(l,r,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,l=>{const u=ge(l),c=s.get(u);c!==void 0&&(s.delete(u),a(c).rem(l))}),t.visit(t.ADD,l=>{const u=i(l);s.set(ge(l),u),a(u).add(l)}),o||t.modified(i.fields)?t.visit(t.MOD,l=>{const u=ge(l),c=s.get(u),f=i(l);c===f?a(f).mod(l):(s.set(u,f),a(c).rem(l),a(f).add(l))}):t.changed(t.MOD)&&t.visit(t.MOD,l=>{a(s.get(ge(l))).mod(l)}),o&&t.visit(t.REFLOW,l=>{const u=ge(l),c=s.get(u),f=i(l);c!==f&&(s.set(u,f),a(c).rem(l),a(f).add(l))}),t.clean()?n.runAfter(()=>{this.clean(),s.clean()}):s.empty>n.cleanThreshold&&n.runAfter(s.clean),t}});function Fk(e){gt.call(this,null,QH,e)}K(Fk,gt);function QH(e){return this.value&&!e.modified()?this.value:q(e.name)?ee(e.name).map(t=>Ai(t)):Ai(e.name,e.as)}function My(e){I.call(this,Gl(),e)}My.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},K(My,I,{transform(e,t){const n=t.dataflow,i=this.value,r=t.fork(),s=r.add,o=r.rem,a=r.mod,l=e.expr;let u=!0;t.visit(t.REM,f=>{const d=ge(f);i.has(d)?i.delete(d):o.push(f)}),t.visit(t.ADD,f=>{l(f,e)?s.push(f):i.set(ge(f),1)});function c(f){const d=ge(f),h=l(f,e),p=i.get(d);h&&p?(i.delete(d),s.push(f)):!h&&!p?(i.set(d,1),o.push(f)):u&&h&&!p&&a.push(f)}return t.visit(t.MOD,c),e.modified()&&(u=!1,t.visit(t.REFLOW,c)),i.empty>n.cleanThreshold&&n.runAfter(i.clean),r}});function Fy(e){I.call(this,[],e)}Fy.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},K(Fy,I,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=Ak(i,e.as||[]),s=e.index||null,o=r.length;return n.rem=this.value,t.visit(t.SOURCE,a=>{const l=i.map(p=>p(a)),u=l.reduce((p,g)=>Math.max(p,g.length),0);let c=0,f,d,h;for(;c<u;++c){for(d=K2(a),f=0;f<o;++f)d[r[f]]=(h=l[f][c])==null?null:h;s&&(d[s]=c),n.add.push(d)}}),this.value=n.source=n.add,s&&n.modifies(s),n.modifies(r)}});function Dy(e){I.call(this,[],e)}Dy.Definition={type:"Fold",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0,length:2,default:["key","value"]}]},K(Dy,I,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=i.map(Et),s=e.as||["key","value"],o=s[0],a=s[1],l=i.length;return n.rem=this.value,t.visit(t.SOURCE,u=>{for(let c=0,f;c<l;++c)f=K2(u),f[o]=r[c],f[a]=i[c](u),n.add.push(f)}),this.value=n.source=n.add,n.modifies(s)}});function Ny(e){I.call(this,null,e)}Ny.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]},K(Ny,I,{transform(e,t){const n=e.expr,i=e.as,r=e.modified(),s=e.initonly?t.ADD:r?t.SOURCE:t.modified(n.fields)||t.modified(i)?t.ADD_MOD:t.ADD;return r&&(t=t.materialize().reflow(!0)),e.initonly||t.modifies(i),t.visit(s,o=>o[i]=n(o,e))}});function Dk(e){I.call(this,[],e)}K(Dk,I,{transform(e,t){const n=t.fork(t.ALL),i=e.generator;let r=this.value,s=e.size-r.length,o,a,l;if(s>0){for(o=[];--s>=0;)o.push(l=et(i(e))),r.push(l);n.add=n.add.length?n.materialize(n.ADD).add.concat(o):o}else a=r.slice(0,-s),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a,r=r.slice(-s);return n.source=this.value=r,n}});const mp={value:"value",median:S4,mean:RU,min:w2,max:ga},eG=[];function Oy(e){I.call(this,[],e)}Oy.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function tG(e){var t=e.method||mp.value,n;if(mp[t]==null)U("Unrecognized imputation method: "+t);else return t===mp.value?(n=e.value!==void 0?e.value:0,()=>n):mp[t]}function nG(e){const t=e.field;return n=>n?t(n):NaN}K(Oy,I,{transform(e,t){var n=t.fork(t.ALL),i=tG(e),r=nG(e),s=Et(e.field),o=Et(e.key),a=(e.groupby||[]).map(Et),l=iG(t.source,e.groupby,e.key,e.keyvals),u=[],c=this.value,f=l.domain.length,d,h,p,g,m,y,b,v,x,_;for(m=0,v=l.length;m<v;++m)for(d=l[m],p=d.values,h=NaN,b=0;b<f;++b)if(d[b]==null){for(g=l.domain[b],_={_impute:!0},y=0,x=p.length;y<x;++y)_[a[y]]=p[y];_[o]=g,_[s]=Number.isNaN(h)?h=i(d,r):h,u.push(et(_))}return u.length&&(n.add=n.materialize(n.ADD).add.concat(u)),c.length&&(n.rem=n.materialize(n.REM).rem.concat(c)),this.value=u,n}});function iG(e,t,n,i){var r=y=>y(m),s=[],o=i?i.slice():[],a={},l={},u,c,f,d,h,p,g,m;for(o.forEach((y,b)=>a[y]=b+1),d=0,g=e.length;d<g;++d)m=e[d],p=n(m),h=a[p]||(a[p]=o.push(p)),c=(u=t?t.map(r):eG)+"",(f=l[c])||(f=l[c]=[],s.push(f),f.values=u),f[h-1]=m;return s.domain=o,s}function Ry(e){po.call(this,e)}Ry.Definition={type:"JoinAggregate",metadata:{modifies:!0},params:[{name:"groupby",type:"field",array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"ops",type:"enum",array:!0,values:af},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]},K(Ry,po,{transform(e,t){const n=this,i=e.modified();let r;return n.value&&(i||t.modified(n._inputs,!0))?(r=n.value=i?n.init(e):{},t.visit(t.SOURCE,s=>n.add(s))):(r=n.value=n.value||this.init(e),t.visit(t.REM,s=>n.rem(s)),t.visit(t.ADD,s=>n.add(s))),n.changes(),t.visit(t.SOURCE,s=>{Fe(s,r[n.cellkey(s)].tuple)}),t.reflow(i).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,i;for(n=0,i=this._alen;n<i;++n)this.celltuple(e[n]),e[n]=null;for(n=0,i=this._mlen;n<i;++n)this.celltuple(t[n]),t[n]=null;this._alen=this._mlen=0}});function Ly(e){I.call(this,null,e)}Ly.Definition={type:"KDE",metadata:{generates:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"cumulative",type:"boolean",default:!1},{name:"counts",type:"boolean",default:!1},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:!0,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:!0,default:["value","density"]}]},K(Ly,I,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=Cy(i,e.groupby,e.field),s=(e.groupby||[]).map(Et),o=e.bandwidth,a=e.cumulative?"cdf":"pdf",l=e.as||["value","density"],u=[];let c=e.extent,f=e.steps||e.minsteps||25,d=e.steps||e.maxsteps||200;a!=="pdf"&&a!=="cdf"&&U("Invalid density method: "+a),e.resolve==="shared"&&(c||(c=Rr(i,e.field)),f=d=e.steps||d),r.forEach(h=>{const p=oy(h,o)[a],g=e.counts?h.length:1,m=c||Rr(h);pp(p,m,f,d).forEach(y=>{const b={};for(let v=0;v<s.length;++v)b[s[v]]=h.dims[v];b[l[0]]=y[0],b[l[1]]=y[1]*g,u.push(et(b))})}),this.value&&(n.rem=this.value),this.value=n.add=n.source=u}return n}});function Nk(e){gt.call(this,null,rG,e)}K(Nk,gt);function rG(e){return this.value&&!e.modified()?this.value:d2(e.fields,e.flat)}function Ok(e){I.call(this,[],e),this._pending=null}K(Ok,I,{transform(e,t){const n=t.dataflow;return this._pending?Iy(this,t,this._pending):sG(e)?t.StopPropagation:e.values?Iy(this,t,n.parse(e.values,e.format)):e.async?{async:n.request(e.url,e.format).then(r=>(this._pending=ee(r.data),s=>s.touch(this)))}:n.request(e.url,e.format).then(i=>Iy(this,t,ee(i.data)))}});function sG(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}function Iy(e,t,n){n.forEach(et);const i=t.fork(t.NO_FIELDS&t.NO_SOURCE);return i.rem=e.value,e.value=i.source=i.add=n,e._pending=null,i.rem.length&&i.clean(!0),i}function zy(e){I.call(this,{},e)}zy.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},K(zy,I,{transform(e,t){const n=e.fields,i=e.index,r=e.values,s=e.default==null?null:e.default,o=e.modified(),a=n.length;let l=o?t.SOURCE:t.ADD,u=t,c=e.as,f,d,h;return r?(d=r.length,a>1&&!c&&U('Multi-field lookup requires explicit "as" parameter.'),c&&c.length!==a*d&&U('The "as" parameter has too few output field names.'),c=c||r.map(Et),f=function(p){for(var g=0,m=0,y,b;g<a;++g)if(b=i.get(n[g](p)),b==null)for(y=0;y<d;++y,++m)p[c[m]]=s;else for(y=0;y<d;++y,++m)p[c[m]]=r[y](b)}):(c||U("Missing output field names."),f=function(p){for(var g=0,m;g<a;++g)m=i.get(n[g](p)),p[c[g]]=m??s}),o?u=t.reflow(!0):(h=n.some(p=>t.modified(p.fields)),l|=h?t.MOD:0),t.visit(l,f),u.modifies(c)}});function Rk(e){gt.call(this,null,oG,e)}K(Rk,gt);function oG(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let i=1/0,r=-1/0,s,o;for(s=0;s<n;++s)o=t[s],o[0]<i&&(i=o[0]),o[1]>r&&(r=o[1]);return[i,r]}function Lk(e){gt.call(this,null,aG,e)}K(Lk,gt);function aG(e){return this.value&&!e.modified()?this.value:e.values.reduce((t,n)=>t.concat(n),[])}function Ik(e){I.call(this,null,e)}K(Ik,I,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function Py(e){po.call(this,e)}Py.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:af,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},K(Py,po,{_transform:po.prototype.transform,transform(e,t){return this._transform(lG(e,t),t)}});function lG(e,t){const n=e.field,i=e.value,r=(e.op==="count"?"__count__":e.op)||"sum",s=fn(n).concat(fn(i)),o=cG(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:o.map(()=>r),fields:o.map(a=>uG(a,n,i,s)),as:o.map(a=>a+""),modified:e.modified.bind(e)}}function uG(e,t,n,i){return Xn(r=>t(r)===e?n(r):NaN,i,e+"")}function cG(e,t,n){const i={},r=[];return n.visit(n.SOURCE,s=>{const o=e(s);i[o]||(i[o]=1,r.push(o))}),r.sort(Lh),t?r.slice(0,t):r}function zk(e){gp.call(this,e)}K(zk,gp,{transform(e,t){const n=e.subflow,i=e.field,r=s=>this.subflow(ge(s),n,t,s);return(e.modified("field")||i&&t.modified(fn(i)))&&U("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,s=>{const o=r(s);i(s).forEach(a=>o.mod(a))}),t.visit(t.ADD,s=>{const o=r(s);i(s).forEach(a=>o.add(et(a)))}),t.visit(t.REM,s=>{const o=r(s);i(s).forEach(a=>o.rem(a))})):(t.visit(t.MOD,s=>r(s).mod(s)),t.visit(t.ADD,s=>r(s).add(s)),t.visit(t.REM,s=>r(s).rem(s))),t.clean()&&t.runAfter(()=>this.clean()),t}});function By(e){I.call(this,null,e)}By.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},K(By,I,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.fields,r=Ak(e.fields,e.as||[]),s=i?(a,l)=>fG(a,l,i,r):rp;let o;return this.value?o=this.value:(t=t.addAll(),o=this.value={}),t.visit(t.REM,a=>{const l=ge(a);n.rem.push(o[l]),o[l]=null}),t.visit(t.ADD,a=>{const l=s(a,et({}));o[ge(a)]=l,n.add.push(l)}),t.visit(t.MOD,a=>{n.mod.push(s(a,o[ge(a)]))}),n}});function fG(e,t,n,i){for(let r=0,s=n.length;r<s;++r)t[i[r]]=n[r](e);return t}function Pk(e){I.call(this,null,e)}K(Pk,I,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function jy(e){I.call(this,null,e)}jy.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};const dG=1e-14;K(jy,I,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const r=t.materialize(t.SOURCE).source,s=Cy(r,e.groupby,e.field),o=(e.groupby||[]).map(Et),a=[],l=e.step||.01,u=e.probs||hi(l/2,1-dG,l),c=u.length;return s.forEach(f=>{const d=ty(f,u);for(let h=0;h<c;++h){const p={};for(let g=0;g<o.length;++g)p[o[g]]=f.dims[g];p[i[0]]=u[h],p[i[1]]=d[h],a.push(et(p))}}),this.value&&(n.rem=this.value),this.value=n.add=n.source=a,n}});function Bk(e){I.call(this,null,e)}K(Bk,I,{transform(e,t){let n,i;return this.value?i=this.value:(n=t=t.addAll(),i=this.value={}),e.derive&&(n=t.fork(t.NO_SOURCE),t.visit(t.REM,r=>{const s=ge(r);n.rem.push(i[s]),i[s]=null}),t.visit(t.ADD,r=>{const s=K2(r);i[ge(r)]=s,n.add.push(s)}),t.visit(t.MOD,r=>{const s=i[ge(r)];for(const o in r)s[o]=r[o],n.modifies(o);n.mod.push(s)})),n}});function Uy(e){I.call(this,[],e),this.count=0}Uy.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},K(Uy,I,{transform(e,t){const n=t.fork(t.NO_SOURCE),i=e.modified("size"),r=e.size,s=this.value.reduce((c,f)=>(c[ge(f)]=1,c),{});let o=this.value,a=this.count,l=0;function u(c){let f,d;o.length<r?o.push(c):(d=~~((a+1)*Di()),d<o.length&&d>=l&&(f=o[d],s[ge(f)]&&n.rem.push(f),o[d]=c)),++a}if(t.rem.length&&(t.visit(t.REM,c=>{const f=ge(c);s[f]&&(s[f]=-1,n.rem.push(c)),--a}),o=o.filter(c=>s[ge(c)]!==-1)),(t.rem.length||i)&&o.length<r&&t.source&&(l=a=o.length,t.visit(t.SOURCE,c=>{s[ge(c)]||u(c)}),l=-1),i&&o.length>r){const c=o.length-r;for(let f=0;f<c;++f)s[ge(o[f])]=-1,n.rem.push(o[f]);o=o.slice(c)}return t.mod.length&&t.visit(t.MOD,c=>{s[ge(c)]&&n.mod.push(c)}),t.add.length&&t.visit(t.ADD,u),(t.add.length||l<0)&&(n.add=o.filter(c=>!s[ge(c)])),this.count=a,this.value=n.source=o,n}});function qy(e){I.call(this,null,e)}qy.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},K(qy,I,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),i=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=hi(e.start,e.stop,e.step||1).map(r=>{const s={};return s[i]=r,et(s)}),n.add=t.add.concat(this.value),n}});function jk(e){I.call(this,null,e),this.modified(!0)}K(jk,I,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});function Wy(e){I.call(this,null,e)}const Uk=["unit0","unit1"];Wy.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:M2,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:Uk}]},K(Wy,I,{transform(e,t){const n=e.field,i=e.interval!==!1,r=e.timezone==="utc",s=this._floor(e,t),o=(r?iu:nu)(s.unit).offset,a=e.as||Uk,l=a[0],u=a[1],c=s.step;let f=s.start||1/0,d=s.stop||-1/0,h=t.ADD;return(e.modified()||t.changed(t.REM)||t.modified(fn(n)))&&(t=t.reflow(!0),h=t.SOURCE,f=1/0,d=-1/0),t.visit(h,p=>{const g=n(p);let m,y;g==null?(p[l]=null,i&&(p[u]=null)):(p[l]=m=y=s(g),i&&(p[u]=y=o(m,c)),m<f&&(f=m),y>d&&(d=y))}),s.start=f,s.stop=d,t.modifies(i?a:l)},_floor(e,t){const n=e.timezone==="utc",{units:i,step:r}=e.units?{units:e.units,step:e.step||1}:u8({extent:e.extent||Rr(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),s=D2(i),o=this.value||{},a=(n?J4:K4)(s,r);return a.unit=Ue(s),a.units=s,a.step=r,a.start=o.start,a.stop=o.stop,this.value=a}});function qk(e){I.call(this,Gl(),e)}K(qk,I,{transform(e,t){const n=t.dataflow,i=e.field,r=this.value,s=a=>r.set(i(a),a);let o=!0;return e.modified("field")||t.modified(i.fields)?(r.clear(),t.visit(t.SOURCE,s)):t.changed()?(t.visit(t.REM,a=>r.delete(i(a))),t.visit(t.ADD,s)):o=!1,this.modified(o),r.empty>n.cleanThreshold&&n.runAfter(r.clean),t.fork()}});function Wk(e){I.call(this,null,e)}K(Wk,I,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(xa(e.sort)):t.source).map(e.field))}});function hG(e,t,n,i){const r=lf[e](t,n);return{init:r.init||io,update:function(s,o){o[i]=r.next(s)}}}const lf={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,i=t.data;return n&&t.compare(i[n-1],i[n])?++e:e}}},percent_rank:function(){const e=lf.rank(),t=e.next;return{init:e.init,next:n=>(t(n)-1)/(n.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,i=t.compare;let r=t.index;if(e<r){for(;r+1<n.length&&!i(n[r],n[r+1]);)++r;e=r}return(1+e)/n.length}}},ntile:function(e,t){t=+t,t>0||U("ntile num must be greater than zero.");const n=lf.cume_dist(),i=n.next;return{init:n.init,next:r=>Math.ceil(t*i(r))}},lag:function(e,t){return t=+t||1,{next:n=>{const i=n.index-t;return i>=0?e(n.data[i]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const i=n.index+t,r=n.data;return i<r.length?e(r[i]):null}}},first_value:function(e){return{next:t=>e(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return t=+t,t>0||U("nth_value nth must be greater than zero."),{next:n=>{const i=n.i0+(t-1);return i<n.i1?e(n.data[i]):null}}},prev_value:function(e){let t;return{init:()=>t=null,next:n=>{const i=e(n.data[n.index]);return i!=null?t=i:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:i=>{const r=i.data;return i.index<=n?t:(n=pG(e,r,i.index))<0?(n=r.length,t=null):t=e(r[n])}}}};function pG(e,t,n){for(let i=t.length;n<i;++n)if(e(t[n])!=null)return n;return-1}const gG=Object.keys(lf);function Hk(e){const t=ee(e.ops),n=ee(e.fields),i=ee(e.params),r=ee(e.aggregate_params),s=ee(e.as),o=this.outputs=[],a=this.windows=[],l={},u={},c=[],f=[];let d=!0;function h(p){ee(fn(p)).forEach(g=>l[g]=1)}h(e.sort),t.forEach((p,g)=>{const m=n[g],y=i[g],b=r[g]||null,v=Et(m),x=bk(p,v,s[g]);if(h(m),o.push(x),pe(lf,p))a.push(hG(p,m,y,x));else{if(m==null&&p!=="count"&&U("Null aggregate field specified."),p==="count"){c.push(x);return}d=!1;let _=u[v];_||(_=u[v]=[],_.field=m,f.push(_)),_.push(vk(p,b,x))}}),(c.length||f.length)&&(this.cell=mG(f,c,d)),this.inputs=Object.keys(l)}const Gk=Hk.prototype;Gk.init=function(){this.windows.forEach(e=>e.init()),this.cell&&this.cell.init()},Gk.update=function(e,t){const n=this.cell,i=this.windows,r=e.data,s=i&&i.length;let o;if(n){for(o=e.p0;o<e.i0;++o)n.rem(r[o]);for(o=e.p1;o<e.i1;++o)n.add(r[o]);n.set(t)}for(o=0;o<s;++o)i[o].update(e,t)};function mG(e,t,n){e=e.map(l=>_k(l,l.field));const i={num:0,agg:null,store:!1,count:t};if(!n)for(var r=e.length,s=i.agg=Array(r),o=0;o<r;++o)s[o]=new e[o](i);if(i.store)var a=i.data=new xy;return i.add=function(l){if(i.num+=1,!n){a&&a.add(l);for(let u=0;u<r;++u)s[u].add(s[u].get(l),l)}},i.rem=function(l){if(i.num-=1,!n){a&&a.rem(l);for(let u=0;u<r;++u)s[u].rem(s[u].get(l),l)}},i.set=function(l){let u,c;for(a&&a.values(),u=0,c=t.length;u<c;++u)l[t[u]]=i.num;if(!n)for(u=0,c=s.length;u<c;++u)s[u].set(l)},i.init=function(){i.num=0,a&&a.reset();for(let l=0;l<r;++l)s[l].init()},i}function Hy(e){I.call(this,{},e),this._mlen=0,this._mods=[]}Hy.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:gG.concat(af)},{name:"params",type:"number",null:!0,array:!0},{name:"aggregate_params",type:"field",null:!0,array:!0,default:[null]},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"frame",type:"number",null:!0,array:!0,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:!1}]},K(Hy,I,{transform(e,t){this.stamp=t.stamp;const n=e.modified(),i=xa(e.sort),r=by(e.groupby),s=a=>this.group(r(a));let o=this.state;(!o||n)&&(o=this.state=new Hk(e)),n||t.modified(o.inputs)?(this.value={},t.visit(t.SOURCE,a=>s(a).add(a))):(t.visit(t.REM,a=>s(a).remove(a)),t.visit(t.ADD,a=>s(a).add(a)));for(let a=0,l=this._mlen;a<l;++a)yG(this._mods[a],o,i,e);return this._mlen=0,this._mods=[],t.reflow(n).modifies(o.outputs)},group(e){let t=this.value[e];return t||(t=this.value[e]=wk(ge),t.stamp=-1),t.stamp<this.stamp&&(t.stamp=this.stamp,this._mods[this._mlen++]=t),t}});function yG(e,t,n,i){const r=i.sort,s=r&&!i.ignorePeers,o=i.frame||[null,0],a=e.data(n),l=a.length,u=s?Xl(r):null,c={i0:0,i1:0,p0:0,p1:0,index:0,data:a,compare:r||pn(-1)};t.init();for(let f=0;f<l;++f)bG(c,o,f,l),s&&vG(c,u),t.update(c,a[f])}function bG(e,t,n,i){e.p0=e.i0,e.p1=e.i1,e.i0=t[0]==null?0:Math.max(0,n-Math.abs(t[0])),e.i1=t[1]==null?i:Math.min(i,n+Math.abs(t[1])+1),e.index=n}function vG(e,t){const n=e.i0,i=e.i1-1,r=e.compare,s=e.data,o=s.length-1;n>0&&!r(s[n],s[n-1])&&(e.i0=t.left(s,s[n])),i<o&&!r(s[i],s[i+1])&&(e.i1=t.right(s,s[i]))}const xG=Object.freeze(Object.defineProperty({__proto__:null,aggregate:po,bin:_y,collect:wy,compare:kk,countpattern:ky,cross:$y,density:Ey,dotbin:Sy,expression:Mk,extent:Ay,facet:gp,field:Fk,filter:My,flatten:Fy,fold:Dy,formula:Ny,generate:Dk,impute:Oy,joinaggregate:Ry,kde:Ly,key:Nk,load:Ok,lookup:zy,multiextent:Rk,multivalues:Lk,params:Ik,pivot:Py,prefacet:zk,project:By,proxy:Pk,quantile:jy,relay:Bk,sample:Uy,sequence:qy,sieve:jk,subflow:Ty,timeunit:Wy,tupleindex:qk,values:Wk,window:Hy},Symbol.toStringTag,{value:"Module"}));function nt(e){return function(){return e}}const Vk=Math.abs,yn=Math.atan2,wa=Math.cos,_G=Math.max,Gy=Math.min,Br=Math.sin,ka=Math.sqrt,bn=1e-12,uu=Math.PI,yp=uu/2,Xk=2*uu;function wG(e){return e>1?0:e<-1?uu:Math.acos(e)}function Yk(e){return e>=1?yp:e<=-1?-yp:Math.asin(e)}const Vy=Math.PI,Xy=2*Vy,$a=1e-6,kG=Xy-$a;function Zk(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function $G(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zk;const n=10**t;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}let Yy=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zk:$G(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,r){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,n,i,r,s,o){this._append`C${+t},${+n},${+i},${+r},${this._x1=+s},${this._y1=+o}`}arcTo(t,n,i,r,s){if(t=+t,n=+n,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,a=this._y1,l=i-t,u=r-n,c=o-t,f=a-n,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>$a)if(!(Math.abs(f*l-u*c)>$a)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let h=i-o,p=r-a,g=l*l+u*u,m=h*h+p*p,y=Math.sqrt(g),b=Math.sqrt(d),v=s*Math.tan((Vy-Math.acos((g+d-m)/(2*y*b)))/2),x=v/b,_=v/y;Math.abs(x-1)>$a&&this._append`L${t+x*c},${n+x*f}`,this._append`A${s},${s},0,0,${+(f*h>c*p)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,i,r,s,o){if(t=+t,n=+n,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),u=t+a,c=n+l,f=1^o,d=o?r-s:s-r;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>$a||Math.abs(this._y1-c)>$a)&&this._append`L${u},${c}`,i&&(d<0&&(d=d%Xy+Xy),d>kG?this._append`A${i},${i},0,1,${f},${t-a},${n-l}A${i},${i},0,1,${f},${this._x1=u},${this._y1=c}`:d>$a&&this._append`A${i},${i},0,${+(d>=Vy)},${f},${this._x1=t+i*Math.cos(s)},${this._y1=n+i*Math.sin(s)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function bp(){return new Yy}bp.prototype=Yy.prototype;function vp(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new Yy(t)}function EG(e){return e.innerRadius}function CG(e){return e.outerRadius}function SG(e){return e.startAngle}function AG(e){return e.endAngle}function TG(e){return e&&e.padAngle}function MG(e,t,n,i,r,s,o,a){var l=n-e,u=i-t,c=o-r,f=a-s,d=f*l-c*u;if(!(d*d<bn))return d=(c*(t-s)-f*(e-r))/d,[e+d*l,t+d*u]}function xp(e,t,n,i,r,s,o){var a=e-n,l=t-i,u=(o?s:-s)/ka(a*a+l*l),c=u*l,f=-u*a,d=e+c,h=t+f,p=n+c,g=i+f,m=(d+p)/2,y=(h+g)/2,b=p-d,v=g-h,x=b*b+v*v,_=r-s,k=d*g-p*h,w=(v<0?-1:1)*ka(_G(0,_*_*x-k*k)),$=(k*v-b*w)/x,S=(-k*b-v*w)/x,E=(k*v+b*w)/x,A=(-k*b+v*w)/x,R=$-m,C=S-y,M=E-m,T=A-y;return R*R+C*C>M*M+T*T&&($=E,S=A),{cx:$,cy:S,x01:-c,y01:-f,x11:$*(r/_-1),y11:S*(r/_-1)}}function FG(){var e=EG,t=CG,n=nt(0),i=null,r=SG,s=AG,o=TG,a=null,l=vp(u);function u(){var c,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=r.apply(this,arguments)-yp,g=s.apply(this,arguments)-yp,m=Vk(g-p),y=g>p;if(a||(a=c=l()),h<d&&(f=h,h=d,d=f),!(h>bn))a.moveTo(0,0);else if(m>Xk-bn)a.moveTo(h*wa(p),h*Br(p)),a.arc(0,0,h,p,g,!y),d>bn&&(a.moveTo(d*wa(g),d*Br(g)),a.arc(0,0,d,g,p,y));else{var b=p,v=g,x=p,_=g,k=m,w=m,$=o.apply(this,arguments)/2,S=$>bn&&(i?+i.apply(this,arguments):ka(d*d+h*h)),E=Gy(Vk(h-d)/2,+n.apply(this,arguments)),A=E,R=E,C,M;if(S>bn){var T=Yk(S/d*Br($)),O=Yk(S/h*Br($));(k-=T*2)>bn?(T*=y?1:-1,x+=T,_-=T):(k=0,x=_=(p+g)/2),(w-=O*2)>bn?(O*=y?1:-1,b+=O,v-=O):(w=0,b=v=(p+g)/2)}var P=h*wa(b),j=h*Br(b),W=d*wa(_),ne=d*Br(_);if(E>bn){var ae=h*wa(v),ke=h*Br(v),Ie=d*wa(x),Le=d*Br(x),We;if(m<uu)if(We=MG(P,j,Ie,Le,ae,ke,W,ne)){var Wn=P-We[0],Mr=j-We[1],Vi=ae-We[0],se=ke-We[1],Te=1/Br(wG((Wn*Vi+Mr*se)/(ka(Wn*Wn+Mr*Mr)*ka(Vi*Vi+se*se)))/2),De=ka(We[0]*We[0]+We[1]*We[1]);A=Gy(E,(d-De)/(Te-1)),R=Gy(E,(h-De)/(Te+1))}else A=R=0}w>bn?R>bn?(C=xp(Ie,Le,P,j,h,R,y),M=xp(ae,ke,W,ne,h,R,y),a.moveTo(C.cx+C.x01,C.cy+C.y01),R<E?a.arc(C.cx,C.cy,R,yn(C.y01,C.x01),yn(M.y01,M.x01),!y):(a.arc(C.cx,C.cy,R,yn(C.y01,C.x01),yn(C.y11,C.x11),!y),a.arc(0,0,h,yn(C.cy+C.y11,C.cx+C.x11),yn(M.cy+M.y11,M.cx+M.x11),!y),a.arc(M.cx,M.cy,R,yn(M.y11,M.x11),yn(M.y01,M.x01),!y))):(a.moveTo(P,j),a.arc(0,0,h,b,v,!y)):a.moveTo(P,j),!(d>bn)||!(k>bn)?a.lineTo(W,ne):A>bn?(C=xp(W,ne,ae,ke,d,-A,y),M=xp(P,j,Ie,Le,d,-A,y),a.lineTo(C.cx+C.x01,C.cy+C.y01),A<E?a.arc(C.cx,C.cy,A,yn(C.y01,C.x01),yn(M.y01,M.x01),!y):(a.arc(C.cx,C.cy,A,yn(C.y01,C.x01),yn(C.y11,C.x11),!y),a.arc(0,0,d,yn(C.cy+C.y11,C.cx+C.x11),yn(M.cy+M.y11,M.cx+M.x11),y),a.arc(M.cx,M.cy,A,yn(M.y11,M.x11),yn(M.y01,M.x01),!y))):a.arc(0,0,d,_,x,y)}if(a.closePath(),c)return a=null,c+""||null}return u.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-uu/2;return[wa(f)*c,Br(f)*c]},u.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:nt(+c),u):e},u.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:nt(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:nt(+c),u):n},u.padRadius=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:nt(+c),u):i},u.startAngle=function(c){return arguments.length?(r=typeof c=="function"?c:nt(+c),u):r},u.endAngle=function(c){return arguments.length?(s=typeof c=="function"?c:nt(+c),u):s},u.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:nt(+c),u):o},u.context=function(c){return arguments.length?(a=c??null,u):a},u}function Kk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jk(e){this._context=e}Jk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Zy(e){return new Jk(e)}function Qk(e){return e[0]}function e9(e){return e[1]}function t9(e,t){var n=nt(!0),i=null,r=Zy,s=null,o=vp(a);e=typeof e=="function"?e:e===void 0?Qk:nt(e),t=typeof t=="function"?t:t===void 0?e9:nt(t);function a(l){var u,c=(l=Kk(l)).length,f,d=!1,h;for(i==null&&(s=r(h=o())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(f,u,l),+t(f,u,l));if(h)return s=null,h+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:nt(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:nt(+l),a):t},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:nt(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(s=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=s=null:s=r(i=l),a):i},a}function n9(e,t,n){var i=null,r=nt(!0),s=null,o=Zy,a=null,l=vp(u);e=typeof e=="function"?e:e===void 0?Qk:nt(+e),t=typeof t=="function"?t:nt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?e9:nt(+n);function u(f){var d,h,p,g=(f=Kk(f)).length,m,y=!1,b,v=new Array(g),x=new Array(g);for(s==null&&(a=o(b=l())),d=0;d<=g;++d){if(!(d<g&&r(m=f[d],d,f))===y)if(y=!y)h=d,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),p=d-1;p>=h;--p)a.point(v[p],x[p]);a.lineEnd(),a.areaEnd()}y&&(v[d]=+e(m,d,f),x[d]=+t(m,d,f),a.point(i?+i(m,d,f):v[d],n?+n(m,d,f):x[d]))}if(b)return a=null,b+""||null}function c(){return t9().defined(r).curve(o).context(s)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),i=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),u):e},u.x1=function(f){return arguments.length?(i=f==null?null:typeof f=="function"?f:nt(+f),u):i},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:nt(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:nt(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:nt(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(i).y(t)},u.defined=function(f){return arguments.length?(r=typeof f=="function"?f:nt(!!f),u):r},u.curve=function(f){return arguments.length?(o=f,s!=null&&(a=o(s)),u):o},u.context=function(f){return arguments.length?(f==null?s=a=null:a=o(s=f),u):s},u}const DG={draw(e,t){const n=ka(t/uu);e.moveTo(n,0),e.arc(0,0,n,0,Xk)}};function NG(e,t){let n=null,i=vp(r);e=typeof e=="function"?e:nt(e||DG),t=typeof t=="function"?t:nt(t===void 0?64:+t);function r(){let s;if(n||(n=s=i()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return r.type=function(s){return arguments.length?(e=typeof s=="function"?s:nt(s),r):e},r.size=function(s){return arguments.length?(t=typeof s=="function"?s:nt(+s),r):t},r.context=function(s){return arguments.length?(n=s??null,r):n},r}function go(){}function _p(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wp(e){this._context=e}wp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_p(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OG(e){return new wp(e)}function i9(e){this._context=e}i9.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RG(e){return new i9(e)}function r9(e){this._context=e}r9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LG(e){return new r9(e)}function s9(e,t){this._basis=new wp(e),this._beta=t}s9.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i=e[0],r=t[0],s=e[n]-i,o=t[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+l*s),this._beta*t[a]+(1-this._beta)*(r+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const IG=function e(t){function n(i){return t===1?new wp(i):new s9(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function kp(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Ky(e,t){this._context=e,this._k=(1-t)/6}Ky.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:kp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zG=function e(t){function n(i){return new Ky(i,t)}return n.tension=function(i){return e(+i)},n}(0);function Jy(e,t){this._context=e,this._k=(1-t)/6}Jy.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:kp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const PG=function e(t){function n(i){return new Jy(i,t)}return n.tension=function(i){return e(+i)},n}(0);function Qy(e,t){this._context=e,this._k=(1-t)/6}Qy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kp(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const BG=function e(t){function n(i){return new Qy(i,t)}return n.tension=function(i){return e(+i)},n}(0);function eb(e,t,n){var i=e._x1,r=e._y1,s=e._x2,o=e._y2;if(e._l01_a>bn){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bn){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*u+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,r,s,o,e._x2,e._y2)}function o9(e,t){this._context=e,this._alpha=t}o9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:eb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jG=function e(t){function n(i){return t?new o9(i,t):new Ky(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function a9(e,t){this._context=e,this._alpha=t}a9.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:eb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const UG=function e(t){function n(i){return t?new a9(i,t):new Jy(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function l9(e,t){this._context=e,this._alpha=t}l9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:eb(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qG=function e(t){function n(i){return t?new l9(i,t):new Qy(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function u9(e){this._context=e}u9.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function WG(e){return new u9(e)}function c9(e){return e<0?-1:1}function f9(e,t,n){var i=e._x1-e._x0,r=t-e._x1,s=(e._y1-e._y0)/(i||r<0&&-0),o=(n-e._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return(c9(s)+c9(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function d9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tb(e,t,n){var i=e._x0,r=e._y0,s=e._x1,o=e._y1,a=(s-i)/3;e._context.bezierCurveTo(i+a,r+a*t,s-a,o-a*n,s,o)}function $p(e){this._context=e}$p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tb(this,this._t0,d9(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tb(this,d9(this,n=f9(this,e,t)),n);break;default:tb(this,this._t0,n=f9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function h9(e){this._context=new p9(e)}(h9.prototype=Object.create($p.prototype)).point=function(e,t){$p.prototype.point.call(this,t,e)};function p9(e){this._context=e}p9.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,r,s){this._context.bezierCurveTo(t,e,i,n,s,r)}};function HG(e){return new $p(e)}function GG(e){return new h9(e)}function g9(e){this._context=e}g9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var i=m9(e),r=m9(t),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[1][s],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function m9(e){var t,n=e.length-1,i,r=new Array(n),s=new Array(n),o=new Array(n);for(r[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)r[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(r[n-1]=2,s[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)i=r[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(r[n-1]=o[n-1]/s[n-1],t=n-2;t>=0;--t)r[t]=(o[t]-r[t+1])/s[t];for(s[n-1]=(e[n]+r[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-r[t+1];return[r,s]}function VG(e){return new g9(e)}function Ep(e,t){this._context=e,this._t=t}Ep.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function XG(e){return new Ep(e,.5)}function YG(e){return new Ep(e,0)}function ZG(e){return new Ep(e,1)}function mo(e,t){if(typeof document<"u"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}const KG=()=>typeof Image<"u"?Image:null;function jr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function yo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const nb=Symbol("implicit");function ib(){var e=new x4,t=[],n=[],i=nb;function r(s){let o=e.get(s);if(o===void 0){if(i!==nb)return i;e.set(s,o=t.push(s)-1)}return n[o%n.length]}return r.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new x4;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return ib(t,n).unknown(i)},jr.apply(r,arguments),r}function cu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function uf(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function bo(){}var Ea=.7,fu=1/Ea,du="\\s*([+-]?\\d+)\\s*",cf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ur="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",JG=/^#([0-9a-f]{3,8})$/,QG=new RegExp(`^rgb\\(${du},${du},${du}\\)$`),eV=new RegExp(`^rgb\\(${Ur},${Ur},${Ur}\\)$`),tV=new RegExp(`^rgba\\(${du},${du},${du},${cf}\\)$`),nV=new RegExp(`^rgba\\(${Ur},${Ur},${Ur},${cf}\\)$`),iV=new RegExp(`^hsl\\(${cf},${Ur},${Ur}\\)$`),rV=new RegExp(`^hsla\\(${cf},${Ur},${Ur},${cf}\\)$`),y9={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};cu(bo,ff,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:b9,formatHex:b9,formatHex8:sV,formatHsl:oV,formatRgb:v9,toString:v9});function b9(){return this.rgb().formatHex()}function sV(){return this.rgb().formatHex8()}function oV(){return $9(this).formatHsl()}function v9(){return this.rgb().formatRgb()}function ff(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=JG.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?x9(t):n===3?new Ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Cp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Cp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=QG.exec(e))?new Ht(t[1],t[2],t[3],1):(t=eV.exec(e))?new Ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tV.exec(e))?Cp(t[1],t[2],t[3],t[4]):(t=nV.exec(e))?Cp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=iV.exec(e))?k9(t[1],t[2]/100,t[3]/100,1):(t=rV.exec(e))?k9(t[1],t[2]/100,t[3]/100,t[4]):y9.hasOwnProperty(e)?x9(y9[e]):e==="transparent"?new Ht(NaN,NaN,NaN,0):null}function x9(e){return new Ht(e>>16&255,e>>8&255,e&255,1)}function Cp(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ht(e,t,n,i)}function rb(e){return e instanceof bo||(e=ff(e)),e?(e=e.rgb(),new Ht(e.r,e.g,e.b,e.opacity)):new Ht}function vo(e,t,n,i){return arguments.length===1?rb(e):new Ht(e,t,n,i??1)}function Ht(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}cu(Ht,vo,uf(bo,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ea:Math.pow(Ea,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ht(Ca(this.r),Ca(this.g),Ca(this.b),Sp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_9,formatHex:_9,formatHex8:aV,formatRgb:w9,toString:w9}));function _9(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}`}function aV(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}${Sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function w9(){const e=Sp(this.opacity);return`${e===1?"rgb(":"rgba("}${Ca(this.r)}, ${Ca(this.g)}, ${Ca(this.b)}${e===1?")":`, ${e})`}`}function Sp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ca(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sa(e){return e=Ca(e),(e<16?"0":"")+e.toString(16)}function k9(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qi(e,t,n,i)}function $9(e){if(e instanceof Qi)return new Qi(e.h,e.s,e.l,e.opacity);if(e instanceof bo||(e=ff(e)),!e)return new Qi;if(e instanceof Qi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),s=Math.max(t,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(t===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-t)/a+2:o=(t-n)/a+4,a/=l<.5?s+r:2-s-r,o*=60):a=l>0&&l<1?0:o,new Qi(o,a,l,e.opacity)}function Ap(e,t,n,i){return arguments.length===1?$9(e):new Qi(e,t,n,i??1)}function Qi(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}cu(Qi,Ap,uf(bo,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new Qi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ea:Math.pow(Ea,e),new Qi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Ht(sb(e>=240?e-240:e+120,r,i),sb(e,r,i),sb(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Qi(E9(this.h),Tp(this.s),Tp(this.l),Sp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Sp(this.opacity);return`${e===1?"hsl(":"hsla("}${E9(this.h)}, ${Tp(this.s)*100}%, ${Tp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function E9(e){return e=(e||0)%360,e<0?e+360:e}function Tp(e){return Math.max(0,Math.min(1,e||0))}function sb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const C9=Math.PI/180,S9=180/Math.PI,Mp=18,A9=.96422,T9=1,M9=.82521,F9=4/29,hu=6/29,D9=3*hu*hu,lV=hu*hu*hu;function N9(e){if(e instanceof qr)return new qr(e.l,e.a,e.b,e.opacity);if(e instanceof Es)return O9(e);e instanceof Ht||(e=rb(e));var t=ub(e.r),n=ub(e.g),i=ub(e.b),r=ob((.2225045*t+.7168786*n+.0606169*i)/T9),s,o;return t===n&&n===i?s=o=r:(s=ob((.4360747*t+.3850649*n+.1430804*i)/A9),o=ob((.0139322*t+.0971045*n+.7141733*i)/M9)),new qr(116*r-16,500*(s-r),200*(r-o),e.opacity)}function Fp(e,t,n,i){return arguments.length===1?N9(e):new qr(e,t,n,i??1)}function qr(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}cu(qr,Fp,uf(bo,{brighter(e){return new qr(this.l+Mp*(e??1),this.a,this.b,this.opacity)},darker(e){return new qr(this.l-Mp*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=A9*ab(t),e=T9*ab(e),n=M9*ab(n),new Ht(lb(3.1338561*t-1.6168667*e-.4906146*n),lb(-.9787684*t+1.9161415*e+.033454*n),lb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ob(e){return e>lV?Math.pow(e,1/3):e/D9+F9}function ab(e){return e>hu?e*e*e:D9*(e-F9)}function lb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ub(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function uV(e){if(e instanceof Es)return new Es(e.h,e.c,e.l,e.opacity);if(e instanceof qr||(e=N9(e)),e.a===0&&e.b===0)return new Es(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*S9;return new Es(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Dp(e,t,n,i){return arguments.length===1?uV(e):new Es(e,t,n,i??1)}function Es(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function O9(e){if(isNaN(e.h))return new qr(e.l,0,0,e.opacity);var t=e.h*C9;return new qr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}cu(Es,Dp,uf(bo,{brighter(e){return new Es(this.h,this.c,this.l+Mp*(e??1),this.opacity)},darker(e){return new Es(this.h,this.c,this.l-Mp*(e??1),this.opacity)},rgb(){return O9(this).rgb()}}));var R9=-.14861,cb=1.78277,fb=-.29227,Np=-.90649,df=1.97294,L9=df*Np,I9=df*cb,z9=cb*fb-Np*R9;function cV(e){if(e instanceof Aa)return new Aa(e.h,e.s,e.l,e.opacity);e instanceof Ht||(e=rb(e));var t=e.r/255,n=e.g/255,i=e.b/255,r=(z9*i+L9*t-I9*n)/(z9+L9-I9),s=i-r,o=(df*(n-r)-fb*s)/Np,a=Math.sqrt(o*o+s*s)/(df*r*(1-r)),l=a?Math.atan2(o,s)*S9-120:NaN;return new Aa(l<0?l+360:l,a,r,e.opacity)}function db(e,t,n,i){return arguments.length===1?cV(e):new Aa(e,t,n,i??1)}function Aa(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}cu(Aa,db,uf(bo,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new Aa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ea:Math.pow(Ea,e),new Aa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*C9,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),r=Math.sin(e);return new Ht(255*(t+n*(R9*i+cb*r)),255*(t+n*(fb*i+Np*r)),255*(t+n*(df*i)),this.opacity)}}));function P9(e,t,n,i,r){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*n+(1+3*e+3*s-3*o)*i+o*r)/6}function B9(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[i],s=e[i+1],o=i>0?e[i-1]:2*r-s,a=i<t-1?e[i+2]:2*s-r;return P9((n-i/t)*t,o,r,s,a)}}function j9(e){var t=e.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*t),r=e[(i+t-1)%t],s=e[i%t],o=e[(i+1)%t],a=e[(i+2)%t];return P9((n-i/t)*t,r,s,o,a)}}const Op=e=>()=>e;function U9(e,t){return function(n){return e+n*t}}function fV(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Rp(e,t){var n=t-e;return n?U9(e,n>180||n<-180?n-360*Math.round(n/360):n):Op(isNaN(e)?t:e)}function dV(e){return(e=+e)==1?Gt:function(t,n){return n-t?fV(t,n,e):Op(isNaN(t)?n:t)}}function Gt(e,t){var n=t-e;return n?U9(e,n):Op(isNaN(e)?t:e)}const hb=function e(t){var n=dV(t);function i(r,s){var o=n((r=vo(r)).r,(s=vo(s)).r),a=n(r.g,s.g),l=n(r.b,s.b),u=Gt(r.opacity,s.opacity);return function(c){return r.r=o(c),r.g=a(c),r.b=l(c),r.opacity=u(c),r+""}}return i.gamma=e,i}(1);function q9(e){return function(t){var n=t.length,i=new Array(n),r=new Array(n),s=new Array(n),o,a;for(o=0;o<n;++o)a=vo(t[o]),i[o]=a.r||0,r[o]=a.g||0,s[o]=a.b||0;return i=e(i),r=e(r),s=e(s),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=s(l),a+""}}}var hV=q9(B9),pV=q9(j9);function pb(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=e[r]*(1-s)+t[r]*s;return i}}function W9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function gV(e,t){return(W9(t)?pb:H9)(e,t)}function H9(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,r=new Array(i),s=new Array(n),o;for(o=0;o<i;++o)r[o]=xo(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(a){for(o=0;o<i;++o)s[o]=r[o](a);return s}}function G9(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function er(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function V9(e,t){var n={},i={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=xo(e[r],t[r]):i[r]=t[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var gb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mb=new RegExp(gb.source,"g");function mV(e){return function(){return e}}function yV(e){return function(t){return e(t)+""}}function X9(e,t){var n=gb.lastIndex=mb.lastIndex=0,i,r,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(i=gb.exec(e))&&(r=mb.exec(t));)(s=r.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:er(i,r)})),n=mb.lastIndex;return n<t.length&&(s=t.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?yV(l[0].x):mV(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)a[(f=l[c]).i]=f.x(u);return a.join("")})}function xo(e,t){var n=typeof t,i;return t==null||n==="boolean"?Op(t):(n==="number"?er:n==="string"?(i=ff(t))?(t=i,hb):X9:t instanceof ff?hb:t instanceof Date?G9:W9(t)?pb:Array.isArray(t)?H9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?V9:er)(e,t)}function bV(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function vV(e,t){var n=Rp(+e,+t);return function(i){var r=n(i);return r-360*Math.floor(r/360)}}function hf(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Y9=180/Math.PI,yb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Z9(e,t,n,i,r,s){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(t,e)*Y9,skewX:Math.atan(l)*Y9,scaleX:o,scaleY:a}}var Lp;function xV(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yb:Z9(t.a,t.b,t.c,t.d,t.e,t.f)}function _V(e){return e==null||(Lp||(Lp=document.createElementNS("http://www.w3.org/2000/svg","g")),Lp.setAttribute("transform",e),!(e=Lp.transform.baseVal.consolidate()))?yb:(e=e.matrix,Z9(e.a,e.b,e.c,e.d,e.e,e.f))}function K9(e,t,n,i){function r(u){return u.length?u.pop()+" ":""}function s(u,c,f,d,h,p){if(u!==f||c!==d){var g=h.push("translate(",null,t,null,n);p.push({i:g-4,x:er(u,f)},{i:g-2,x:er(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function o(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(r(f)+"rotate(",null,i)-2,x:er(u,c)})):c&&f.push(r(f)+"rotate("+c+i)}function a(u,c,f,d){u!==c?d.push({i:f.push(r(f)+"skewX(",null,i)-2,x:er(u,c)}):c&&f.push(r(f)+"skewX("+c+i)}function l(u,c,f,d,h,p){if(u!==f||c!==d){var g=h.push(r(h)+"scale(",null,",",null,")");p.push({i:g-4,x:er(u,f)},{i:g-2,x:er(c,d)})}else(f!==1||d!==1)&&h.push(r(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),s(u.translateX,u.translateY,c.translateX,c.translateY,f,d),o(u.rotate,c.rotate,f,d),a(u.skewX,c.skewX,f,d),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var p=-1,g=d.length,m;++p<g;)f[(m=d[p]).i]=m.x(h);return f.join("")}}}var wV=K9(xV,"px, ","px)","deg)"),kV=K9(_V,", ",")",")"),$V=1e-12;function J9(e){return((e=Math.exp(e))+1/e)/2}function EV(e){return((e=Math.exp(e))-1/e)/2}function CV(e){return((e=Math.exp(2*e))-1)/(e+1)}const SV=function e(t,n,i){function r(s,o){var a=s[0],l=s[1],u=s[2],c=o[0],f=o[1],d=o[2],h=c-a,p=f-l,g=h*h+p*p,m,y;if(g<$V)y=Math.log(d/u)/t,m=function(w){return[a+w*h,l+w*p,u*Math.exp(t*w*y)]};else{var b=Math.sqrt(g),v=(d*d-u*u+i*g)/(2*u*n*b),x=(d*d-u*u-i*g)/(2*d*n*b),_=Math.log(Math.sqrt(v*v+1)-v),k=Math.log(Math.sqrt(x*x+1)-x);y=(k-_)/t,m=function(w){var $=w*y,S=J9(_),E=u/(n*b)*(S*CV(t*$+_)-EV(_));return[a+E*h,l+E*p,u*S/J9(t*$+_)]}}return m.duration=y*1e3*t/Math.SQRT2,m}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return e(o,a,l)},r}(Math.SQRT2,2,4);function Q9(e){return function(t,n){var i=e((t=Ap(t)).h,(n=Ap(n)).h),r=Gt(t.s,n.s),s=Gt(t.l,n.l),o=Gt(t.opacity,n.opacity);return function(a){return t.h=i(a),t.s=r(a),t.l=s(a),t.opacity=o(a),t+""}}}const AV=Q9(Rp);var TV=Q9(Gt);function MV(e,t){var n=Gt((e=Fp(e)).l,(t=Fp(t)).l),i=Gt(e.a,t.a),r=Gt(e.b,t.b),s=Gt(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=i(o),e.b=r(o),e.opacity=s(o),e+""}}function e$(e){return function(t,n){var i=e((t=Dp(t)).h,(n=Dp(n)).h),r=Gt(t.c,n.c),s=Gt(t.l,n.l),o=Gt(t.opacity,n.opacity);return function(a){return t.h=i(a),t.c=r(a),t.l=s(a),t.opacity=o(a),t+""}}}const FV=e$(Rp);var DV=e$(Gt);function t$(e){return function t(n){n=+n;function i(r,s){var o=e((r=db(r)).h,(s=db(s)).h),a=Gt(r.s,s.s),l=Gt(r.l,s.l),u=Gt(r.opacity,s.opacity);return function(c){return r.h=o(c),r.s=a(c),r.l=l(Math.pow(c,n)),r.opacity=u(c),r+""}}return i.gamma=t,i}(1)}const NV=t$(Rp);var OV=t$(Gt);function bb(e,t){t===void 0&&(t=e,e=xo);for(var n=0,i=t.length-1,r=t[0],s=new Array(i<0?0:i);n<i;)s[n]=e(r,r=t[++n]);return function(o){var a=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return s[a](o-a)}}function RV(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e(i/(t-1));return n}const LV=Object.freeze(Object.defineProperty({__proto__:null,interpolate:xo,interpolateArray:gV,interpolateBasis:B9,interpolateBasisClosed:j9,interpolateCubehelix:NV,interpolateCubehelixLong:OV,interpolateDate:G9,interpolateDiscrete:bV,interpolateHcl:FV,interpolateHclLong:DV,interpolateHsl:AV,interpolateHslLong:TV,interpolateHue:vV,interpolateLab:MV,interpolateNumber:er,interpolateNumberArray:pb,interpolateObject:V9,interpolateRgb:hb,interpolateRgbBasis:hV,interpolateRgbBasisClosed:pV,interpolateRound:hf,interpolateString:X9,interpolateTransformCss:wV,interpolateTransformSvg:kV,interpolateZoom:SV,piecewise:bb,quantize:RV},Symbol.toStringTag,{value:"Module"}));function IV(e){return function(){return e}}function vb(e){return+e}var n$=[0,1];function Jn(e){return e}function xb(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:IV(isNaN(t)?NaN:.5)}function zV(e,t){var n;return e>t&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}function PV(e,t,n){var i=e[0],r=e[1],s=t[0],o=t[1];return r<i?(i=xb(r,i),s=n(o,s)):(i=xb(i,r),s=n(s,o)),function(a){return s(i(a))}}function BV(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),s=new Array(i),o=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<i;)r[o]=xb(e[o],e[o+1]),s[o]=n(t[o],t[o+1]);return function(a){var l=zc(e,a,1,i)-1;return s[l](r[l](a))}}function pf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ip(){var e=n$,t=n$,n=xo,i,r,s,o=Jn,a,l,u;function c(){var d=Math.min(e.length,t.length);return o!==Jn&&(o=zV(e[0],e[d-1])),a=d>2?BV:PV,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?s:(l||(l=a(e.map(i),t,n)))(i(o(d)))}return f.invert=function(d){return o(r((u||(u=a(t,e.map(i),er)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,vb),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=hf,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Jn,c()):o!==Jn},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(s=d,f):s},function(d,h){return i=d,r=h,c()}}function i$(){return Ip()(Jn,Jn)}function r$(e,t,n,i){var r=lo(e,t,n),s;switch(i=ma(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(s=z4(r,o))&&(i.precision=s),E2(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=P4(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=I4(r))&&(i.precision=s-(i.type==="%")*2);break}}return qh(i)}function Ta(e){var t=e.domain;return e.ticks=function(n){var i=t();return x2(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return r$(r[0],r[r.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=t(),r=0,s=i.length-1,o=i[r],a=i[s],l,u,c=10;for(a<o&&(u=o,o=a,a=u,u=r,r=s,s=u);c-- >0;){if(u=_2(o,a,n),u===l)return i[r]=o,i[s]=a,t(i);if(u>0)o=Math.floor(o/u)*u,a=Math.ceil(a/u)*u;else if(u<0)o=Math.ceil(o*u)/u,a=Math.floor(a*u)/u;else break;l=u}return e},e}function s$(){var e=i$();return e.copy=function(){return pf(e,s$())},jr.apply(e,arguments),Ta(e)}function o$(e){var t;function n(i){return i==null||isNaN(i=+i)?t:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(e=Array.from(i,vb),n):e.slice()},n.unknown=function(i){return arguments.length?(t=i,n):t},n.copy=function(){return o$(e).unknown(t)},e=arguments.length?Array.from(e,vb):[0,1],Ta(n)}function a$(e,t){e=e.slice();var n=0,i=e.length-1,r=e[n],s=e[i],o;return s<r&&(o=n,n=i,i=o,o=r,r=s,s=o),e[n]=t.floor(r),e[i]=t.ceil(s),e}function l$(e){return Math.log(e)}function u$(e){return Math.exp(e)}function jV(e){return-Math.log(-e)}function UV(e){return-Math.exp(-e)}function qV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function WV(e){return e===10?qV:e===Math.E?Math.exp:t=>Math.pow(e,t)}function HV(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function c$(e){return(t,n)=>-e(-t,n)}function _b(e){const t=e(l$,u$),n=t.domain;let i=10,r,s;function o(){return r=HV(i),s=WV(i),n()[0]<0?(r=c$(r),s=c$(s),e(jV,UV)):e(l$,u$),t}return t.base=function(a){return arguments.length?(i=+a,o()):i},t.domain=function(a){return arguments.length?(n(a),o()):n()},t.ticks=a=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=r(u),h=r(c),p,g;const m=a==null?10:+a;let y=[];if(!(i%1)&&h-d<m){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(p=1;p<i;++p)if(g=d<0?p/s(-d):p*s(d),!(g<u)){if(g>c)break;y.push(g)}}else for(;d<=h;++d)for(p=i-1;p>=1;--p)if(g=d>0?p/s(-d):p*s(d),!(g<u)){if(g>c)break;y.push(g)}y.length*2<m&&(y=x2(u,c,m))}else y=x2(d,h,Math.min(h-d,m)).map(s);return f?y.reverse():y},t.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=ma(l)).precision==null&&(l.trim=!0),l=qh(l)),a===1/0)return l;const u=Math.max(1,i*a/t.ticks().length);return c=>{let f=c/s(Math.round(r(c)));return f*i<i-.5&&(f*=i),f<=u?l(c):""}},t.nice=()=>n(a$(n(),{floor:a=>s(Math.floor(r(a))),ceil:a=>s(Math.ceil(r(a)))})),t}function f$(){const e=_b(Ip()).domain([1,10]);return e.copy=()=>pf(e,f$()).base(e.base()),jr.apply(e,arguments),e}function d$(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function h$(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function wb(e){var t=1,n=e(d$(t),h$(t));return n.constant=function(i){return arguments.length?e(d$(t=+i),h$(t)):t},Ta(n)}function p$(){var e=wb(Ip());return e.copy=function(){return pf(e,p$()).constant(e.constant())},jr.apply(e,arguments)}function g$(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function GV(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function VV(e){return e<0?-e*e:e*e}function kb(e){var t=e(Jn,Jn),n=1;function i(){return n===1?e(Jn,Jn):n===.5?e(GV,VV):e(g$(n),g$(1/n))}return t.exponent=function(r){return arguments.length?(n=+r,i()):n},Ta(t)}function $b(){var e=kb(Ip());return e.copy=function(){return pf(e,$b()).exponent(e.exponent())},jr.apply(e,arguments),e}function XV(){return $b.apply(null,arguments).exponent(.5)}function m$(){var e=[],t=[],n=[],i;function r(){var o=0,a=Math.max(1,t.length);for(n=new Array(a-1);++o<a;)n[o-1]=C4(e,o/a);return s}function s(o){return o==null||isNaN(o=+o)?i:t[zc(n,o)]}return s.invertExtent=function(o){var a=t.indexOf(o);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},s.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let a of o)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(bs),r()},s.range=function(o){return arguments.length?(t=Array.from(o),r()):t.slice()},s.unknown=function(o){return arguments.length?(i=o,s):i},s.quantiles=function(){return n.slice()},s.copy=function(){return m$().domain(e).range(t).unknown(i)},jr.apply(s,arguments)}function y$(){var e=0,t=1,n=1,i=[.5],r=[0,1],s;function o(l){return l!=null&&l<=l?r[zc(i,l,0,n)]:s}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,a()):[e,t]},o.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},o.invertExtent=function(l){var u=r.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,i[0]]:u>=n?[i[n-1],t]:[i[u-1],i[u]]},o.unknown=function(l){return arguments.length&&(s=l),o},o.thresholds=function(){return i.slice()},o.copy=function(){return y$().domain([e,t]).range(r).unknown(s)},jr.apply(Ta(o),arguments)}function b$(){var e=[.5],t=[0,1],n,i=1;function r(s){return s!=null&&s<=s?t[zc(e,s,0,i)]:n}return r.domain=function(s){return arguments.length?(e=Array.from(s),i=Math.min(e.length,t.length-1),r):e.slice()},r.range=function(s){return arguments.length?(t=Array.from(s),i=Math.min(e.length,t.length-1),r):t.slice()},r.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},r.unknown=function(s){return arguments.length?(n=s,r):n},r.copy=function(){return b$().domain(e).range(t).unknown(n)},jr.apply(r,arguments)}function YV(e){return new Date(e)}function ZV(e){return e instanceof Date?+e:+new Date(+e)}function Eb(e,t,n,i,r,s,o,a,l,u){var c=i$(),f=c.invert,d=c.domain,h=u(".%L"),p=u(":%S"),g=u("%I:%M"),m=u("%I %p"),y=u("%a %d"),b=u("%b %d"),v=u("%B"),x=u("%Y");function _(k){return(l(k)<k?h:a(k)<k?p:o(k)<k?g:s(k)<k?m:i(k)<k?r(k)<k?y:b:n(k)<k?v:x)(k)}return c.invert=function(k){return new Date(f(k))},c.domain=function(k){return arguments.length?d(Array.from(k,ZV)):d().map(YV)},c.ticks=function(k){var w=d();return e(w[0],w[w.length-1],k??10)},c.tickFormat=function(k,w){return w==null?_:u(w)},c.nice=function(k){var w=d();return(!k||typeof k.range!="function")&&(k=t(w[0],w[w.length-1],k??10)),k?d(a$(w,k)):c},c.copy=function(){return pf(c,Eb(e,t,n,i,r,s,o,a,l,u))},c}function KV(){return jr.apply(Eb(iq,rq,Lr,Bc,Kl,ks,Gh,Wh,ws,j2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function JV(){return jr.apply(Eb(tq,nq,Ir,jc,Ql,uo,Vh,Hh,ws,U2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function zp(){var e=0,t=1,n,i,r,s,o=Jn,a=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(r===0?.5:(f=(s(f)-n)*r,a?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=s(e=+e),i=s(t=+t),r=n===i?0:1/(i-n),u):[e,t]},u.clamp=function(f){return arguments.length?(a=!!f,u):a},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,o=f(h,p),u):[o(0),o(1)]}}return u.range=c(xo),u.rangeRound=c(hf),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return s=f,n=f(e),i=f(t),r=n===i?0:1/(i-n),u}}function _o(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Cb(){var e=Ta(zp()(Jn));return e.copy=function(){return _o(e,Cb())},yo.apply(e,arguments)}function v$(){var e=_b(zp()).domain([1,10]);return e.copy=function(){return _o(e,v$()).base(e.base())},yo.apply(e,arguments)}function x$(){var e=wb(zp());return e.copy=function(){return _o(e,x$()).constant(e.constant())},yo.apply(e,arguments)}function Sb(){var e=kb(zp());return e.copy=function(){return _o(e,Sb()).exponent(e.exponent())},yo.apply(e,arguments)}function QV(){return Sb.apply(null,arguments).exponent(.5)}function Pp(){var e=0,t=.5,n=1,i=1,r,s,o,a,l,u=Jn,c,f=!1,d;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+c(g))-s)*(i*g<i*s?a:l),u(f?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t,n]=g,r=c(e=+e),s=c(t=+t),o=c(n=+n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,h):[e,t,n]},h.clamp=function(g){return arguments.length?(f=!!g,h):f},h.interpolator=function(g){return arguments.length?(u=g,h):u};function p(g){return function(m){var y,b,v;return arguments.length?([y,b,v]=m,u=bb(g,[y,b,v]),h):[u(0),u(.5),u(1)]}}return h.range=p(xo),h.rangeRound=p(hf),h.unknown=function(g){return arguments.length?(d=g,h):d},function(g){return c=g,r=g(e),s=g(t),o=g(n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,h}}function _$(){var e=Ta(Pp()(Jn));return e.copy=function(){return _o(e,_$())},yo.apply(e,arguments)}function w$(){var e=_b(Pp()).domain([.1,1,10]);return e.copy=function(){return _o(e,w$()).base(e.base())},yo.apply(e,arguments)}function k$(){var e=wb(Pp());return e.copy=function(){return _o(e,k$()).constant(e.constant())},yo.apply(e,arguments)}function Ab(){var e=kb(Pp());return e.copy=function(){return _o(e,Ab()).exponent(e.exponent())},yo.apply(e,arguments)}function eX(){return Ab.apply(null,arguments).exponent(.5)}function Tb(e,t,n){const i=e-t+n*2;return e?i>0?i:1:0}const tX="identity",pu="linear",Cs="log",gf="pow",mf="sqrt",Bp="symlog",Ma="time",Fa="utc",Wr="sequential",gu="diverging",mu="quantile",jp="quantize",Up="threshold",Mb="ordinal",Fb="point",$$="band",Db="bin-ordinal",zt="continuous",yf="discrete",bf="discretizing",Ni="interpolating",Nb="temporal";function nX(e){return function(t){let n=t[0],i=t[1],r;return i<n&&(r=n,n=i,i=r),[e.invert(n),e.invert(i)]}}function iX(e){return function(t){const n=e.range();let i=t[0],r=t[1],s=-1,o,a,l,u;for(r<i&&(a=i,i=r,r=a),l=0,u=n.length;l<u;++l)n[l]>=i&&n[l]<=r&&(s<0&&(s=l),o=l);if(!(s<0))return i=e.invertExtent(n[s]),r=e.invertExtent(n[o]),[i[0]===void 0?i[1]:i[0],r[1]===void 0?r[0]:r[1]]}}function Ob(){const e=ib().unknown(void 0),t=e.domain,n=e.range;let i=[0,1],r,s,o=!1,a=0,l=0,u=.5;delete e.unknown;function c(){const f=t().length,d=i[1]<i[0],h=i[1-d],p=Tb(f,a,l);let g=i[d-0];r=(h-g)/(p||1),o&&(r=Math.floor(r)),g+=(h-g-r*(f-a))*u,s=r*(1-a),o&&(g=Math.round(g),s=Math.round(s));const m=hi(f).map(y=>g+r*y);return n(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(i=[+f[0],+f[1]],c()):i.slice()},e.rangeRound=function(f){return i=[+f[0],+f[1]],o=!0,c()},e.bandwidth=function(){return s},e.step=function(){return r},e.round=function(f){return arguments.length?(o=!!f,c()):o},e.padding=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),a=l,c()):a},e.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),c()):a},e.paddingOuter=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=i[1]<i[0],h=d?n().reverse():n(),p=h.length-1;let g=+f[0],m=+f[1],y,b,v;if(!(g!==g||m!==m)&&(m<g&&(v=g,g=m,m=v),!(m<h[0]||g>i[1-d])))return y=Math.max(0,zh(h,g)-1),b=g===m?y:zh(h,m)-1,g-h[y]>s+1e-10&&++y,d&&(v=y,y=p-b,b=p-v),y>b?void 0:t().slice(y,b+1)},e.invert=function(f){const d=e.invertRange([f,f]);return d&&d[0]},e.copy=function(){return Ob().domain(t()).range(i).round(o).paddingInner(a).paddingOuter(l).align(u)},c()}function E$(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return E$(t())},e}function rX(){return E$(Ob().paddingInner(1))}var sX=Array.prototype.map;function oX(e){return sX.call(e,hn)}const aX=Array.prototype.slice;function C$(){let e=[],t=[];function n(i){return i==null||i!==i?void 0:t[(zc(e,i)-1)%t.length]}return n.domain=function(i){return arguments.length?(e=oX(i),n):e.slice()},n.range=function(i){return arguments.length?(t=aX.call(i),n):t.slice()},n.tickFormat=function(i,r){return r$(e[0],Ue(e),i??10,r)},n.copy=function(){return C$().domain(n.domain()).range(n.range())},n}const qp=new Map,S$=Symbol("vega_scale");function A$(e){return e[S$]=!0,e}function lX(e){return e&&e[S$]===!0}function uX(e,t,n){const i=function(){const s=t();return s.invertRange||(s.invertRange=s.invert?nX(s):s.invertExtent?iX(s):void 0),s.type=e,A$(s)};return i.metadata=Ki(ee(n)),i}function Ke(e,t,n){return arguments.length>1?(qp.set(e,uX(e,t,n)),this):T$(e)?qp.get(e):void 0}Ke(tX,o$),Ke(pu,s$,zt),Ke(Cs,f$,[zt,Cs]),Ke(gf,$b,zt),Ke(mf,XV,zt),Ke(Bp,p$,zt),Ke(Ma,KV,[zt,Nb]),Ke(Fa,JV,[zt,Nb]),Ke(Wr,Cb,[zt,Ni]),Ke(`${Wr}-${pu}`,Cb,[zt,Ni]),Ke(`${Wr}-${Cs}`,v$,[zt,Ni,Cs]),Ke(`${Wr}-${gf}`,Sb,[zt,Ni]),Ke(`${Wr}-${mf}`,QV,[zt,Ni]),Ke(`${Wr}-${Bp}`,x$,[zt,Ni]),Ke(`${gu}-${pu}`,_$,[zt,Ni]),Ke(`${gu}-${Cs}`,w$,[zt,Ni,Cs]),Ke(`${gu}-${gf}`,Ab,[zt,Ni]),Ke(`${gu}-${mf}`,eX,[zt,Ni]),Ke(`${gu}-${Bp}`,k$,[zt,Ni]),Ke(mu,m$,[bf,mu]),Ke(jp,y$,bf),Ke(Up,b$,bf),Ke(Db,C$,[yf,bf]),Ke(Mb,ib,yf),Ke($$,Ob,yf),Ke(Fb,rX,yf);function T$(e){return qp.has(e)}function Da(e,t){const n=qp.get(e);return n&&n.metadata[t]}function Rb(e){return Da(e,zt)}function yu(e){return Da(e,yf)}function Lb(e){return Da(e,bf)}function M$(e){return Da(e,Cs)}function cX(e){return Da(e,Nb)}function F$(e){return Da(e,Ni)}function D$(e){return Da(e,mu)}const fX=["clamp","base","constant","exponent"];function N$(e,t){const n=t[0],i=Ue(t)-n;return function(r){return e(n+r*i)}}function Wp(e,t,n){return bb(Ib(t||"rgb",n),e)}function O$(e,t){const n=new Array(t),i=t+1;for(let r=0;r<t;)n[r]=e(++r/i);return n}function R$(e,t,n){const i=n-t;let r,s,o;return!i||!Number.isFinite(i)?pn(.5):(r=(s=e.type).indexOf("-"),s=r<0?s:s.slice(r+1),o=Ke(s)().domain([t,n]).range([0,1]),fX.forEach(a=>e[a]?o[a](e[a]()):0),o)}function Ib(e,t){const n=LV[dX(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function dX(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const hX={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},pX={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function L$(e){const t=e.length/6|0,n=new Array(t);for(let i=0;i<t;)n[i]="#"+e.slice(i*6,++i*6);return n}function I$(e,t){for(const n in e)zb(n,t(e[n]))}const z$={};I$(pX,L$),I$(hX,e=>Wp(L$(e)));function zb(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(z$[e]=t,this):z$[e]}const Hp="symbol",gX="discrete",mX="gradient",yX=e=>q(e)?e.map(t=>String(t)):String(e),bX=(e,t)=>e[1]-t[1],vX=(e,t)=>t[1]-e[1];function Pb(e,t,n){let i;return Xe(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),n!=null&&(t=Math.min(t,Math.floor(Lc(e.domain())/n||1)+1))),ie(t)&&(i=t.step,t=t.interval),te(t)&&(t=e.type===Ma?nu(t):e.type==Fa?iu(t):U("Only time and utc scales accept interval strings."),i&&(t=t.every(i))),t}function P$(e,t,n){let i=e.range(),r=i[0],s=Ue(i),o=bX;if(r>s&&(i=s,s=r,r=i,o=vX),r=Math.floor(r),s=Math.ceil(s),t=t.map(a=>[a,e(a)]).filter(a=>r<=a[1]&&a[1]<=s).sort(o).map(a=>a[0]),n>0&&t.length>1){const a=[t[0],Ue(t)];for(;t.length>n&&t.length>=3;)t=t.filter((l,u)=>!(u%2));t.length<3&&(t=a)}return t}function Bb(e,t){return e.bins?P$(e,e.bins):e.ticks?e.ticks(t):e.domain()}function B$(e,t,n,i,r,s){const o=t.type;let a=yX;if(o===Ma||r===Ma)a=e.timeFormat(i);else if(o===Fa||r===Fa)a=e.utcFormat(i);else if(M$(o)){const l=e.formatFloat(i);if(s||t.bins)a=l;else{const u=j$(t,n,!1);a=c=>u(c)?l(c):""}}else if(t.tickFormat){const l=t.domain();a=e.formatSpan(l[0],l[l.length-1],n,i)}else i&&(a=e.format(i));return a}function j$(e,t,n){const i=Bb(e,t),r=e.base(),s=Math.log(r),o=Math.max(1,r*t/i.length),a=l=>{let u=l/Math.pow(r,Math.round(Math.log(l)/s));return u*r<r-.5&&(u*=r),u<=o};return n?i.filter(a):a}const jb={[mu]:"quantiles",[jp]:"thresholds",[Up]:"domain"},U$={[mu]:"quantiles",[jp]:"domain"};function q$(e,t){return e.bins?wX(e.bins):e.type===Cs?j$(e,t,!0):jb[e.type]?_X(e[jb[e.type]]()):Bb(e,t)}function xX(e,t,n){const i=t[U$[t.type]](),r=i.length;let s=r>1?i[1]-i[0]:i[0],o;for(o=1;o<r;++o)s=Math.min(s,i[o]-i[o-1]);return e.formatSpan(0,s,3*10,n)}function _X(e){const t=[-1/0].concat(e);return t.max=1/0,t}function wX(e){const t=e.slice(0,-1);return t.max=Ue(e),t}const kX=e=>jb[e.type]||e.bins;function W$(e,t,n,i,r,s,o){const a=U$[t.type]&&s!==Ma&&s!==Fa?xX(e,t,r):B$(e,t,n,r,s,o);return i===Hp&&kX(t)?$X(a):i===gX?EX(a):CX(a)}const $X=e=>(t,n,i)=>{const r=H$(i[n+1],H$(i.max,1/0)),s=G$(t,e),o=G$(r,e);return s&&o?s+" – "+o:o?"< "+o:"≥ "+s},H$=(e,t)=>e??t,EX=e=>(t,n)=>n?e(t):null,CX=e=>t=>e(t),G$=(e,t)=>Number.isFinite(e)?t(e):null;function SX(e){const t=e.domain(),n=t.length-1;let i=+t[0],r=+Ue(t),s=r-i;if(e.type===Up){const o=n?s/n:.1;i-=o,r+=o,s=r-i}return o=>(o-i)/s}function AX(e,t,n,i){const r=i||t.type;return te(n)&&cX(r)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),!n&&r===Ma?e.timeFormat("%A, %d %B %Y, %X"):!n&&r===Fa?e.utcFormat("%A, %d %B %Y, %X UTC"):W$(e,t,5,null,n,i,!0)}function V$(e,t,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=AX(e,t,n.format,n.formatType);if(Lb(t.type)){const s=q$(t).slice(1).map(r),o=s.length;return`${o} boundar${o===1?"y":"ies"}: ${s.join(", ")}`}else if(yu(t.type)){const s=t.domain(),o=s.length,a=o>i?s.slice(0,i-2).map(r).join(", ")+", ending with "+s.slice(-1).map(r):s.map(r).join(", ");return`${o} value${o===1?"":"s"}: ${a}`}else{const s=t.domain();return`values from ${r(s[0])} to ${r(Ue(s))}`}}let X$=0;function TX(){X$=0}const Gp="p_";function Ub(e){return e&&e.gradient}function Y$(e,t,n){const i=e.gradient;let r=e.id,s=i==="radial"?Gp:"";return r||(r=e.id="gradient_"+X$++,i==="radial"?(e.x1=Hr(e.x1,.5),e.y1=Hr(e.y1,.5),e.r1=Hr(e.r1,0),e.x2=Hr(e.x2,.5),e.y2=Hr(e.y2,.5),e.r2=Hr(e.r2,.5),s=Gp):(e.x1=Hr(e.x1,0),e.y1=Hr(e.y1,0),e.x2=Hr(e.x2,1),e.y2=Hr(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+s+r+")"}function Hr(e,t){return e??t}function Z$(e,t){var n=[],i;return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(r,s){return n.push({offset:r,color:s}),i}}}const K$={basis:{curve:OG},"basis-closed":{curve:RG},"basis-open":{curve:LG},bundle:{curve:IG,tension:"beta",value:.85},cardinal:{curve:zG,tension:"tension",value:0},"cardinal-open":{curve:BG,tension:"tension",value:0},"cardinal-closed":{curve:PG,tension:"tension",value:0},"catmull-rom":{curve:jG,tension:"alpha",value:.5},"catmull-rom-closed":{curve:UG,tension:"alpha",value:.5},"catmull-rom-open":{curve:qG,tension:"alpha",value:.5},linear:{curve:Zy},"linear-closed":{curve:WG},monotone:{horizontal:GG,vertical:HG},natural:{curve:VG},step:{curve:XG},"step-after":{curve:ZG},"step-before":{curve:YG}};function qb(e,t,n){var i=pe(K$,e)&&K$[e],r=null;return i&&(r=i.curve||i[t||"vertical"],i.tension&&n!=null&&(r=r[i.tension](n))),r}const MX={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},FX=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,DX=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,NX=/^((\s+,?\s*)|(,\s*))/,OX=/^[01]/;function bu(e){const t=[];return(e.match(FX)||[]).forEach(i=>{let r=i[0];const s=r.toLowerCase(),o=MX[s],a=RX(s,o,i.slice(1).trim()),l=a.length;if(l<o||l&&l%o!==0)throw Error("Invalid SVG path, incorrect parameter count");if(t.push([r,...a.slice(0,o)]),l!==o){s==="m"&&(r=r==="M"?"L":"l");for(let u=o;u<l;u+=o)t.push([r,...a.slice(u,u+o)])}}),t}function RX(e,t,n){const i=[];for(let r=0;t&&r<n.length;)for(let s=0;s<t;++s){const o=e==="a"&&(s===3||s===4)?OX:DX,a=n.slice(r).match(o);if(a===null)throw Error("Invalid SVG path, incorrect parameter type");r+=a[0].length,i.push(+a[0]);const l=n.slice(r).match(NX);l!==null&&(r+=l[0].length)}return i}const wo=Math.PI/180,LX=1e-14,Na=Math.PI/2,Gr=Math.PI*2,vu=Math.sqrt(3)/2;var Wb={},Hb={},J$=[].join;function IX(e,t,n,i,r,s,o,a,l){const u=J$.call(arguments);if(Wb[u])return Wb[u];const c=o*wo,f=Math.sin(c),d=Math.cos(c);n=Math.abs(n),i=Math.abs(i);const h=d*(a-e)*.5+f*(l-t)*.5,p=d*(l-t)*.5-f*(a-e)*.5;let g=h*h/(n*n)+p*p/(i*i);g>1&&(g=Math.sqrt(g),n*=g,i*=g);const m=d/n,y=f/n,b=-f/i,v=d/i,x=m*a+y*l,_=b*a+v*l,k=m*e+y*t,w=b*e+v*t;let S=1/((k-x)*(k-x)+(w-_)*(w-_))-.25;S<0&&(S=0);let E=Math.sqrt(S);s==r&&(E=-E);const A=.5*(x+k)-E*(w-_),R=.5*(_+w)+E*(k-x),C=Math.atan2(_-R,x-A);let T=Math.atan2(w-R,k-A)-C;T<0&&s===1?T+=Gr:T>0&&s===0&&(T-=Gr);const O=Math.ceil(Math.abs(T/(Na+.001))),P=[];for(let j=0;j<O;++j){const W=C+j*T/O,ne=C+(j+1)*T/O;P[j]=[A,R,W,ne,n,i,f,d]}return Wb[u]=P}function zX(e){const t=J$.call(e);if(Hb[t])return Hb[t];var n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],u=e[7];const c=u*o,f=-l*a,d=l*o,h=u*a,p=Math.cos(r),g=Math.sin(r),m=Math.cos(s),y=Math.sin(s),b=.5*(s-r),v=Math.sin(b*.5),x=8/3*v*v/Math.sin(b),_=n+p-x*g,k=i+g+x*p,w=n+m,$=i+y,S=w+x*y,E=$-x*m;return Hb[t]=[c*_+f*k,d*_+h*k,c*S+f*E,d*S+h*E,c*w+f*$,d*w+h*$]}const Oi=["l",0,0,0,0,0,0,0];function PX(e,t,n){const i=Oi[0]=e[0];if(i==="a"||i==="A")Oi[1]=t*e[1],Oi[2]=n*e[2],Oi[3]=e[3],Oi[4]=e[4],Oi[5]=e[5],Oi[6]=t*e[6],Oi[7]=n*e[7];else if(i==="h"||i==="H")Oi[1]=t*e[1];else if(i==="v"||i==="V")Oi[1]=n*e[1];else for(var r=1,s=e.length;r<s;++r)Oi[r]=(r%2==1?t:n)*e[r];return Oi}function vf(e,t,n,i,r,s){var o,a=null,l=0,u=0,c=0,f=0,d,h,p,g,m=0,y=0;n==null&&(n=0),i==null&&(i=0),r==null&&(r=1),s==null&&(s=r),e.beginPath&&e.beginPath();for(var b=0,v=t.length;b<v;++b){switch(o=t[b],(r!==1||s!==1)&&(o=PX(o,r,s)),o[0]){case"l":l+=o[1],u+=o[2],e.lineTo(l+n,u+i);break;case"L":l=o[1],u=o[2],e.lineTo(l+n,u+i);break;case"h":l+=o[1],e.lineTo(l+n,u+i);break;case"H":l=o[1],e.lineTo(l+n,u+i);break;case"v":u+=o[1],e.lineTo(l+n,u+i);break;case"V":u=o[1],e.lineTo(l+n,u+i);break;case"m":l+=o[1],u+=o[2],m=l,y=u,e.moveTo(l+n,u+i);break;case"M":l=o[1],u=o[2],m=l,y=u,e.moveTo(l+n,u+i);break;case"c":d=l+o[5],h=u+o[6],c=l+o[3],f=u+o[4],e.bezierCurveTo(l+o[1]+n,u+o[2]+i,c+n,f+i,d+n,h+i),l=d,u=h;break;case"C":l=o[5],u=o[6],c=o[3],f=o[4],e.bezierCurveTo(o[1]+n,o[2]+i,c+n,f+i,l+n,u+i);break;case"s":d=l+o[3],h=u+o[4],c=2*l-c,f=2*u-f,e.bezierCurveTo(c+n,f+i,l+o[1]+n,u+o[2]+i,d+n,h+i),c=l+o[1],f=u+o[2],l=d,u=h;break;case"S":d=o[3],h=o[4],c=2*l-c,f=2*u-f,e.bezierCurveTo(c+n,f+i,o[1]+n,o[2]+i,d+n,h+i),l=d,u=h,c=o[1],f=o[2];break;case"q":d=l+o[3],h=u+o[4],c=l+o[1],f=u+o[2],e.quadraticCurveTo(c+n,f+i,d+n,h+i),l=d,u=h;break;case"Q":d=o[3],h=o[4],e.quadraticCurveTo(o[1]+n,o[2]+i,d+n,h+i),l=d,u=h,c=o[1],f=o[2];break;case"t":d=l+o[1],h=u+o[2],a[0].match(/[QqTt]/)===null?(c=l,f=u):a[0]==="t"?(c=2*l-p,f=2*u-g):a[0]==="q"&&(c=2*l-c,f=2*u-f),p=c,g=f,e.quadraticCurveTo(c+n,f+i,d+n,h+i),l=d,u=h,c=l+o[1],f=u+o[2];break;case"T":d=o[1],h=o[2],c=2*l-c,f=2*u-f,e.quadraticCurveTo(c+n,f+i,d+n,h+i),l=d,u=h;break;case"a":Q$(e,l+n,u+i,[o[1],o[2],o[3],o[4],o[5],o[6]+l+n,o[7]+u+i]),l+=o[6],u+=o[7];break;case"A":Q$(e,l+n,u+i,[o[1],o[2],o[3],o[4],o[5],o[6]+n,o[7]+i]),l=o[6],u=o[7];break;case"z":case"Z":l=m,u=y,e.closePath();break}a=o}}function Q$(e,t,n,i){const r=IX(i[5],i[6],i[0],i[1],i[3],i[4],i[2],t,n);for(let s=0;s<r.length;++s){const o=zX(r[s]);e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5])}}const eE=.5773502691896257,tE={circle:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(n,0),e.arc(0,0,n,0,Gr)}},cross:{draw:function(e,t){var n=Math.sqrt(t)/2,i=n/2.5;e.moveTo(-n,-i),e.lineTo(-n,i),e.lineTo(-i,i),e.lineTo(-i,n),e.lineTo(i,n),e.lineTo(i,i),e.lineTo(n,i),e.lineTo(n,-i),e.lineTo(i,-i),e.lineTo(i,-n),e.lineTo(-i,-n),e.lineTo(-i,-i),e.closePath()}},diamond:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.closePath()}},square:{draw:function(e,t){var n=Math.sqrt(t),i=-n/2;e.rect(i,i,n,n)}},arrow:{draw:function(e,t){var n=Math.sqrt(t)/2,i=n/7,r=n/2.5,s=n/8;e.moveTo(-i,n),e.lineTo(i,n),e.lineTo(i,-s),e.lineTo(r,-s),e.lineTo(0,-n),e.lineTo(-r,-s),e.lineTo(-i,-s),e.closePath()}},wedge:{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n,r=i-n*eE,s=n/4;e.moveTo(0,-i-r),e.lineTo(-s,i-r),e.lineTo(s,i-r),e.closePath()}},triangle:{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n,r=i-n*eE;e.moveTo(0,-i-r),e.lineTo(-n,i-r),e.lineTo(n,i-r),e.closePath()}},"triangle-up":{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n;e.moveTo(0,-i),e.lineTo(-n,i),e.lineTo(n,i),e.closePath()}},"triangle-down":{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n;e.moveTo(0,i),e.lineTo(-n,-i),e.lineTo(n,-i),e.closePath()}},"triangle-right":{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n;e.moveTo(i,0),e.lineTo(-i,-n),e.lineTo(-i,n),e.closePath()}},"triangle-left":{draw:function(e,t){var n=Math.sqrt(t)/2,i=vu*n;e.moveTo(-i,0),e.lineTo(i,-n),e.lineTo(i,n),e.closePath()}},stroke:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(n,0)}}};function nE(e){return pe(tE,e)?tE[e]:BX(e)}var Gb={};function BX(e){if(!pe(Gb,e)){const t=bu(e);Gb[e]={draw:function(n,i){vf(n,t,0,0,Math.sqrt(i)/2)}}}return Gb[e]}const ko=.448084975506;function jX(e){return e.x}function UX(e){return e.y}function qX(e){return e.width}function WX(e){return e.height}function Ss(e){return typeof e=="function"?e:()=>+e}function Vp(e,t,n){return Math.max(t,Math.min(e,n))}function iE(){var e=jX,t=UX,n=qX,i=WX,r=Ss(0),s=r,o=r,a=r,l=null;function u(c,f,d){var h,p=f??+e.call(this,c),g=d??+t.call(this,c),m=+n.call(this,c),y=+i.call(this,c),b=Math.min(m,y)/2,v=Vp(+r.call(this,c),0,b),x=Vp(+s.call(this,c),0,b),_=Vp(+o.call(this,c),0,b),k=Vp(+a.call(this,c),0,b);if(l||(l=h=bp()),v<=0&&x<=0&&_<=0&&k<=0)l.rect(p,g,m,y);else{var w=p+m,$=g+y;l.moveTo(p+v,g),l.lineTo(w-x,g),l.bezierCurveTo(w-ko*x,g,w,g+ko*x,w,g+x),l.lineTo(w,$-k),l.bezierCurveTo(w,$-ko*k,w-ko*k,$,w-k,$),l.lineTo(p+_,$),l.bezierCurveTo(p+ko*_,$,p,$-ko*_,p,$-_),l.lineTo(p,g+v),l.bezierCurveTo(p,g+ko*v,p+ko*v,g,p+v,g),l.closePath()}if(h)return l=null,h+""||null}return u.x=function(c){return arguments.length?(e=Ss(c),u):e},u.y=function(c){return arguments.length?(t=Ss(c),u):t},u.width=function(c){return arguments.length?(n=Ss(c),u):n},u.height=function(c){return arguments.length?(i=Ss(c),u):i},u.cornerRadius=function(c,f,d,h){return arguments.length?(r=Ss(c),s=f!=null?Ss(f):r,a=d!=null?Ss(d):r,o=h!=null?Ss(h):s,u):r},u.context=function(c){return arguments.length?(l=c??null,u):l},u}function rE(){var e,t,n,i,r=null,s,o,a,l;function u(f,d,h){const p=h/2;if(s){var g=a-d,m=f-o;if(g||m){var y=Math.hypot(g,m),b=(g/=y)*l,v=(m/=y)*l,x=Math.atan2(m,g);r.moveTo(o-b,a-v),r.lineTo(f-g*p,d-m*p),r.arc(f,d,p,x-Math.PI,x),r.lineTo(o+b,a+v),r.arc(o,a,l,x,x+Math.PI)}else r.arc(f,d,p,0,Gr);r.closePath()}else s=1;o=f,a=d,l=p}function c(f){var d,h=f.length,p,g=!1,m;for(r==null&&(r=m=bp()),d=0;d<=h;++d)!(d<h&&i(p=f[d],d,f))===g&&(g=!g)&&(s=0),g&&u(+e(p,d,f),+t(p,d,f),+n(p,d,f));if(m)return r=null,m+""||null}return c.x=function(f){return arguments.length?(e=f,c):e},c.y=function(f){return arguments.length?(t=f,c):t},c.size=function(f){return arguments.length?(n=f,c):n},c.defined=function(f){return arguments.length?(i=f,c):i},c.context=function(f){return arguments.length?(f==null?r=null:r=f,c):r},c}function xf(e,t){return e??t}const _f=e=>e.x||0,wf=e=>e.y||0,HX=e=>e.width||0,GX=e=>e.height||0,VX=e=>(e.x||0)+(e.width||0),XX=e=>(e.y||0)+(e.height||0),YX=e=>e.startAngle||0,ZX=e=>e.endAngle||0,KX=e=>e.padAngle||0,JX=e=>e.innerRadius||0,QX=e=>e.outerRadius||0,eY=e=>e.cornerRadius||0,tY=e=>xf(e.cornerRadiusTopLeft,e.cornerRadius)||0,nY=e=>xf(e.cornerRadiusTopRight,e.cornerRadius)||0,iY=e=>xf(e.cornerRadiusBottomRight,e.cornerRadius)||0,rY=e=>xf(e.cornerRadiusBottomLeft,e.cornerRadius)||0,sY=e=>xf(e.size,64),oY=e=>e.size||1,Xp=e=>e.defined!==!1,aY=e=>nE(e.shape||"circle"),lY=FG().startAngle(YX).endAngle(ZX).padAngle(KX).innerRadius(JX).outerRadius(QX).cornerRadius(eY),uY=n9().x(_f).y1(wf).y0(XX).defined(Xp),cY=n9().y(wf).x1(_f).x0(VX).defined(Xp),fY=t9().x(_f).y(wf).defined(Xp),dY=iE().x(_f).y(wf).width(HX).height(GX).cornerRadius(tY,nY,iY,rY),hY=NG().type(aY).size(sY),pY=rE().x(_f).y(wf).defined(Xp).size(oY);function Vb(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function gY(e,t){return lY.context(e)(t)}function mY(e,t){const n=t[0],i=n.interpolate||"linear";return(n.orient==="horizontal"?cY:uY).curve(qb(i,n.orient,n.tension)).context(e)(t)}function yY(e,t){const n=t[0],i=n.interpolate||"linear";return fY.curve(qb(i,n.orient,n.tension)).context(e)(t)}function xu(e,t,n,i){return dY.context(e)(t,n,i)}function bY(e,t){return(t.mark.shape||t.shape).context(e)(t)}function vY(e,t){return hY.context(e)(t)}function xY(e,t){return pY.context(e)(t)}var sE=1;function oE(){sE=1}function Xb(e,t,n){var i=t.clip,r=e._defs,s=t.clip_id||(t.clip_id="clip"+sE++),o=r.clipping[s]||(r.clipping[s]={id:s});return Me(i)?o.path=i(null):Vb(n)?o.path=xu(null,n,0,0):(o.width=n.width||0,o.height=n.height||0),"url(#"+s+")"}function Ot(e){this.clear(),e&&this.union(e)}Ot.prototype={clone(){return new Ot(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,i){return n<e?(this.x2=e,this.x1=n):(this.x1=e,this.x2=n),i<t?(this.y2=t,this.y1=i):(this.y1=t,this.y2=i),this},add(e,t){return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const i=this.rotatedPoints(e,t,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(e,t,n){var{x1:i,y1:r,x2:s,y2:o}=this,a=Math.cos(e),l=Math.sin(e),u=t-t*a+n*l,c=n-t*l-n*a;return[a*i-l*r+u,l*i+a*r+c,a*i-l*o+u,l*i+a*o+c,a*s-l*r+u,l*s+a*r+c,a*s-l*o+u,l*s+a*o+c]},union(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2<this.x2&&(this.x2=e.x2),e.y2<this.y2&&(this.y2=e.y2),this},encloses(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)},contains(e,t){return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function Yp(e){this.mark=e,this.bounds=this.bounds||new Ot}function Zp(e){Yp.call(this,e),this.items=this.items||[]}K(Zp,Yp);function Yb(e){this._pending=0,this._loader=e||ep()}function aE(e){e._pending+=1}function kf(e){e._pending-=1}Yb.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return aE(t),t._loader.sanitize(e,{context:"href"}).then(n=>(kf(t),n)).catch(()=>(kf(t),null))},loadImage(e){const t=this,n=KG();return aE(t),t._loader.sanitize(e,{context:"image"}).then(i=>{const r=i.href;if(!r||!n)throw{url:r};const s=new n,o=pe(i,"crossOrigin")?i.crossOrigin:"anonymous";return o!=null&&(s.crossOrigin=o),s.onload=()=>kf(t),s.onerror=()=>kf(t),s.src=r,s}).catch(i=>(kf(t),{complete:!1,width:0,height:0,src:i&&i.url||""}))},ready(){const e=this;return new Promise(t=>{function n(i){e.pending()?setTimeout(()=>{n(!0)},10):t(i)}n(!1)})}};function As(e,t,n){if(t.stroke&&t.opacity!==0&&t.strokeOpacity!==0){const i=t.strokeWidth!=null?+t.strokeWidth:1;e.expand(i+(n?_Y(t,i):0))}return e}function _Y(e,t){return e.strokeJoin&&e.strokeJoin!=="miter"?0:t}const wY=Gr-1e-8;let Kp,Jp,Qp,Oa,Zb,eg,Kb,Jb;const $o=(e,t)=>Kp.add(e,t),tg=(e,t)=>$o(Jp=e,Qp=t),lE=e=>$o(e,Kp.y1),uE=e=>$o(Kp.x1,e),Ra=(e,t)=>Zb*e+Kb*t,La=(e,t)=>eg*e+Jb*t,Qb=(e,t)=>$o(Ra(e,t),La(e,t)),e3=(e,t)=>tg(Ra(e,t),La(e,t));function $f(e,t){return Kp=e,t?(Oa=t*wo,Zb=Jb=Math.cos(Oa),eg=Math.sin(Oa),Kb=-eg):(Zb=Jb=1,Oa=eg=Kb=0),kY}const kY={beginPath(){},closePath(){},moveTo:e3,lineTo:e3,rect(e,t,n,i){Oa?(Qb(e+n,t),Qb(e+n,t+i),Qb(e,t+i),e3(e,t)):($o(e+n,t+i),tg(e,t))},quadraticCurveTo(e,t,n,i){const r=Ra(e,t),s=La(e,t),o=Ra(n,i),a=La(n,i);cE(Jp,r,o,lE),cE(Qp,s,a,uE),tg(o,a)},bezierCurveTo(e,t,n,i,r,s){const o=Ra(e,t),a=La(e,t),l=Ra(n,i),u=La(n,i),c=Ra(r,s),f=La(r,s);fE(Jp,o,l,c,lE),fE(Qp,a,u,f,uE),tg(c,f)},arc(e,t,n,i,r,s){if(i+=Oa,r+=Oa,Jp=n*Math.cos(r)+e,Qp=n*Math.sin(r)+t,Math.abs(r-i)>wY)$o(e-n,t-n),$o(e+n,t+n);else{const o=u=>$o(n*Math.cos(u)+e,n*Math.sin(u)+t);let a,l;if(o(i),o(r),r!==i)if(i=i%Gr,i<0&&(i+=Gr),r=r%Gr,r<0&&(r+=Gr),r<i&&(s=!s,a=i,i=r,r=a),s)for(r-=Gr,a=i-i%Na,l=0;l<4&&a>r;++l,a-=Na)o(a);else for(a=i-i%Na+Na,l=0;l<4&&a<r;++l,a=a+Na)o(a)}}};function cE(e,t,n,i){const r=(e-t)/(e+n-2*t);0<r&&r<1&&i(e+(t-e)*r)}function fE(e,t,n,i,r){const s=i-e+3*t-3*n,o=e+n-2*t,a=e-t;let l=0,u=0,c;Math.abs(s)>LX?(c=o*o+a*s,c>=0&&(c=Math.sqrt(c),l=(-o+c)/s,u=(-o-c)/s)):l=.5*a/o,0<l&&l<1&&r(dE(l,e,t,n,i)),0<u&&u<1&&r(dE(u,e,t,n,i))}function dE(e,t,n,i,r){const s=1-e,o=s*s,a=e*e;return o*s*t+3*o*e*n+3*s*a*i+a*e*r}var Eo=(Eo=mo(1,1))?Eo.getContext("2d"):null;const t3=new Ot;function n3(e){return function(t,n){if(!Eo)return!0;e(Eo,t),t3.clear().union(t.bounds).intersect(n).round();const{x1:i,y1:r,x2:s,y2:o}=t3;for(let a=r;a<=o;++a)for(let l=i;l<=s;++l)if(Eo.isPointInPath(l,a))return!0;return!1}}function i3(e,t){return t.contains(e.x||0,e.y||0)}function hE(e,t){const n=e.x||0,i=e.y||0,r=e.width||0,s=e.height||0;return t.intersects(t3.set(n,i,n+r,i+s))}function pE(e,t){const n=e.x||0,i=e.y||0,r=e.x2!=null?e.x2:n,s=e.y2!=null?e.y2:i;return _u(t,n,i,r,s)}function _u(e,t,n,i,r){const{x1:s,y1:o,x2:a,y2:l}=e,u=i-t,c=r-n;let f=0,d=1,h,p,g,m;for(m=0;m<4;++m){if(m===0&&(h=-u,p=-(s-t)),m===1&&(h=u,p=a-t),m===2&&(h=-c,p=-(o-n)),m===3&&(h=c,p=l-n),Math.abs(h)<1e-10&&p<0)return!1;if(g=p/h,h<0){if(g>d)return!1;g>f&&(f=g)}else if(h>0){if(g<f)return!1;g<d&&(d=g)}}return!0}function wu(e,t){e.globalCompositeOperation=t.blend||"source-over"}function tr(e,t){return e??t}function gE(e,t){const n=t.length;for(let i=0;i<n;++i)e.addColorStop(t[i].offset,t[i].color);return e}function $Y(e,t,n){const i=n.width(),r=n.height();let s;if(t.gradient==="radial")s=e.createRadialGradient(n.x1+tr(t.x1,.5)*i,n.y1+tr(t.y1,.5)*r,Math.max(i,r)*tr(t.r1,0),n.x1+tr(t.x2,.5)*i,n.y1+tr(t.y2,.5)*r,Math.max(i,r)*tr(t.r2,.5));else{const o=tr(t.x1,0),a=tr(t.y1,0),l=tr(t.x2,1),u=tr(t.y2,0);if(o===l||a===u||i===r)s=e.createLinearGradient(n.x1+o*i,n.y1+a*r,n.x1+l*i,n.y1+u*r);else{const c=mo(Math.ceil(i),Math.ceil(r)),f=c.getContext("2d");return f.scale(i,r),f.fillStyle=gE(f.createLinearGradient(o,a,l,u),t.stops),f.fillRect(0,0,i,r),e.createPattern(c,"no-repeat")}}return gE(s,t.stops)}function mE(e,t,n){return Ub(n)?$Y(e,n,t.bounds):n}function ng(e,t,n){return n*=t.fillOpacity==null?1:t.fillOpacity,n>0?(e.globalAlpha=n,e.fillStyle=mE(e,t,t.fill),!0):!1}var EY=[];function ku(e,t,n){var i=(i=t.strokeWidth)!=null?i:1;return i<=0?!1:(n*=t.strokeOpacity==null?1:t.strokeOpacity,n>0?(e.globalAlpha=n,e.strokeStyle=mE(e,t,t.stroke),e.lineWidth=i,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||EY),e.lineDashOffset=t.strokeDashOffset||0),!0):!1)}function CY(e,t){return e.zindex-t.zindex||e.index-t.index}function r3(e){if(!e.zdirty)return e.zitems;var t=e.items,n=[],i,r,s;for(r=0,s=t.length;r<s;++r)i=t[r],i.index=r,i.zindex&&n.push(i);return e.zdirty=!1,e.zitems=n.sort(CY)}function nr(e,t){var n=e.items,i,r;if(!n||!n.length)return;const s=r3(e);if(s&&s.length){for(i=0,r=n.length;i<r;++i)n[i].zindex||t(n[i]);n=s}for(i=0,r=n.length;i<r;++i)t(n[i])}function ig(e,t){var n=e.items,i,r;if(!n||!n.length)return null;const s=r3(e);for(s&&s.length&&(n=s),r=n.length;--r>=0;)if(i=t(n[r]))return i;if(n===s){for(n=e.items,r=n.length;--r>=0;)if(!n[r].zindex&&(i=t(n[r])))return i}return null}function s3(e){return function(t,n,i){nr(n,r=>{(!i||i.intersects(r.bounds))&&yE(e,t,r,r)})}}function SY(e){return function(t,n,i){n.items.length&&(!i||i.intersects(n.bounds))&&yE(e,t,n.items[0],n.items)}}function yE(e,t,n,i){var r=n.opacity==null?1:n.opacity;r!==0&&(e(t,i)||(wu(t,n),n.fill&&ng(t,n,r)&&t.fill(),n.stroke&&ku(t,n,r)&&t.stroke()))}function rg(e){return e=e||Ti,function(t,n,i,r,s,o){return i*=t.pixelRatio,r*=t.pixelRatio,ig(n,a=>{const l=a.bounds;if(!(l&&!l.contains(s,o)||!l)&&e(t,a,i,r,s,o))return a})}}function Ef(e,t){return function(n,i,r,s){var o=Array.isArray(i)?i[0]:i,a=t??o.fill,l=o.stroke&&n.isPointInStroke,u,c;return l&&(u=o.strokeWidth,c=o.strokeCap,n.lineWidth=u??1,n.lineCap=c??"butt"),e(n,i)?!1:a&&n.isPointInPath(r,s)||l&&n.isPointInStroke(r,s)}}function o3(e){return rg(Ef(e))}function Ia(e,t){return"translate("+e+","+t+")"}function a3(e){return"rotate("+e+")"}function AY(e,t){return"scale("+e+","+t+")"}function bE(e){return Ia(e.x||0,e.y||0)}function TY(e){return Ia(e.x||0,e.y||0)+(e.angle?" "+a3(e.angle):"")}function MY(e){return Ia(e.x||0,e.y||0)+(e.angle?" "+a3(e.angle):"")+(e.scaleX||e.scaleY?" "+AY(e.scaleX||1,e.scaleY||1):"")}function l3(e,t,n){function i(o,a){o("transform",TY(a)),o("d",t(null,a))}function r(o,a){return t($f(o,a.angle),a),As(o,a).translate(a.x||0,a.y||0)}function s(o,a){var l=a.x||0,u=a.y||0,c=a.angle||0;o.translate(l,u),c&&o.rotate(c*=wo),o.beginPath(),t(o,a),c&&o.rotate(-c),o.translate(-l,-u)}return{type:e,tag:"path",nested:!1,attr:i,bound:r,draw:s3(s),pick:o3(s),isect:n||n3(s)}}var FY=l3("arc",gY);function DY(e,t){for(var n=e[0].orient==="horizontal"?t[1]:t[0],i=e[0].orient==="horizontal"?"y":"x",r=e.length,s=1/0,o,a;--r>=0;)e[r].defined!==!1&&(a=Math.abs(e[r][i]-n),a<s&&(s=a,o=e[r]));return o}function NY(e,t){for(var n=Math.pow(e[0].strokeWidth||1,2),i=e.length,r,s,o;--i>=0;)if(e[i].defined!==!1&&(r=e[i].x-t[0],s=e[i].y-t[1],o=r*r+s*s,o<n))return e[i];return null}function OY(e,t){for(var n=e.length,i,r,s;--n>=0;)if(e[n].defined!==!1&&(i=e[n].x-t[0],r=e[n].y-t[1],s=i*i+r*r,i=e[n].size||1,s<i*i))return e[n];return null}function u3(e,t,n){function i(l,u){var c=u.mark.items;c.length&&l("d",t(null,c))}function r(l,u){var c=u.items;return c.length===0?l:(t($f(l),c),As(l,c[0]))}function s(l,u){l.beginPath(),t(l,u)}const o=Ef(s);function a(l,u,c,f,d,h){var p=u.items,g=u.bounds;return!p||!p.length||g&&!g.contains(d,h)?null:(c*=l.pixelRatio,f*=l.pixelRatio,o(l,p,c,f)?p[0]:null)}return{type:e,tag:"path",nested:!0,attr:i,bound:r,draw:SY(s),pick:a,isect:i3,tip:n}}var RY=u3("area",mY,DY);function LY(e,t){var n=t.clip;e.save(),Me(n)?(e.beginPath(),n(e),e.clip()):vE(e,t.group)}function vE(e,t){e.beginPath(),Vb(t)?xu(e,t,0,0):e.rect(0,0,t.width||0,t.height||0),e.clip()}function xE(e){const t=tr(e.strokeWidth,1);return e.strokeOffset!=null?e.strokeOffset:e.stroke&&t>.5&&t<1.5?.5-Math.abs(t-1):0}function IY(e,t){e("transform",bE(t))}function _E(e,t){const n=xE(t);e("d",xu(null,t,n,n))}function zY(e,t){e("class","background"),e("aria-hidden",!0),_E(e,t)}function PY(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?_E(e,t):e("d","")}function BY(e,t,n){const i=t.clip?Xb(n,t,t):null;e("clip-path",i)}function jY(e,t){if(!t.clip&&t.items){const n=t.items,i=n.length;for(let r=0;r<i;++r)e.union(n[r].bounds)}return(t.clip||t.width||t.height)&&!t.noBound&&e.add(0,0).add(t.width||0,t.height||0),As(e,t),e.translate(t.x||0,t.y||0)}function Cf(e,t,n,i){const r=xE(t);e.beginPath(),xu(e,t,(n||0)+r,(i||0)+r)}const UY=Ef(Cf),qY=Ef(Cf,!1),WY=Ef(Cf,!0);function HY(e,t,n,i){nr(t,r=>{const s=r.x||0,o=r.y||0,a=r.strokeForeground,l=r.opacity==null?1:r.opacity;(r.stroke||r.fill)&&l&&(Cf(e,r,s,o),wu(e,r),r.fill&&ng(e,r,l)&&e.fill(),r.stroke&&!a&&ku(e,r,l)&&e.stroke()),e.save(),e.translate(s,o),r.clip&&vE(e,r),n&&n.translate(-s,-o),nr(r,u=>{(u.marktype==="group"||i==null||i.includes(u.marktype))&&this.draw(e,u,n,i)}),n&&n.translate(s,o),e.restore(),a&&r.stroke&&l&&(Cf(e,r,s,o),wu(e,r),ku(e,r,l)&&e.stroke())})}function GY(e,t,n,i,r,s){if(t.bounds&&!t.bounds.contains(r,s)||!t.items)return null;const o=n*e.pixelRatio,a=i*e.pixelRatio;return ig(t,l=>{let u,c,f;const d=l.bounds;if(d&&!d.contains(r,s))return;c=l.x||0,f=l.y||0;const h=c+(l.width||0),p=f+(l.height||0),g=l.clip;if(g&&(r<c||r>h||s<f||s>p))return;if(e.save(),e.translate(c,f),c=r-c,f=s-f,g&&Vb(l)&&!WY(e,l,o,a))return e.restore(),null;const m=l.strokeForeground,y=t.interactive!==!1;return y&&m&&l.stroke&&qY(e,l,o,a)?(e.restore(),l):(u=ig(l,b=>VY(b,c,f)?this.pick(b,n,i,c,f):null),!u&&y&&(l.fill||!m&&l.stroke)&&UY(e,l,o,a)&&(u=l),e.restore(),u||null)})}function VY(e,t,n){return(e.interactive!==!1||e.marktype==="group")&&e.bounds&&e.bounds.contains(t,n)}var XY={type:"group",tag:"g",nested:!1,attr:IY,bound:jY,draw:HY,pick:GY,isect:hE,content:BY,background:zY,foreground:PY},Sf={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function c3(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then(i=>{e.image=i,e.image.url=e.url})),n}function f3(e,t){return e.width!=null?e.width:!t||!t.width?0:e.aspect!==!1&&e.height?e.height*t.width/t.height:t.width}function d3(e,t){return e.height!=null?e.height:!t||!t.height?0:e.aspect!==!1&&e.width?e.width*t.height/t.width:t.height}function sg(e,t){return e==="center"?t/2:e==="right"?t:0}function og(e,t){return e==="middle"?t/2:e==="bottom"?t:0}function YY(e,t,n){const i=c3(t,n),r=f3(t,i),s=d3(t,i),o=(t.x||0)-sg(t.align,r),a=(t.y||0)-og(t.baseline,s),l=!i.src&&i.toDataURL?i.toDataURL():i.src||"";e("href",l,Sf["xmlns:xlink"],"xlink:href"),e("transform",Ia(o,a)),e("width",r),e("height",s),e("preserveAspectRatio",t.aspect===!1?"none":"xMidYMid")}function ZY(e,t){const n=t.image,i=f3(t,n),r=d3(t,n),s=(t.x||0)-sg(t.align,i),o=(t.y||0)-og(t.baseline,r);return e.set(s,o,s+i,o+r)}function KY(e,t,n){nr(t,i=>{if(n&&!n.intersects(i.bounds))return;const r=c3(i,this);let s=f3(i,r),o=d3(i,r);if(s===0||o===0)return;let a=(i.x||0)-sg(i.align,s),l=(i.y||0)-og(i.baseline,o),u,c,f,d;i.aspect!==!1&&(c=r.width/r.height,f=i.width/i.height,c===c&&f===f&&c!==f&&(f<c?(d=s/c,l+=(o-d)/2,o=d):(d=o*c,a+=(s-d)/2,s=d))),(r.complete||r.toDataURL)&&(wu(e,i),e.globalAlpha=(u=i.opacity)!=null?u:1,e.imageSmoothingEnabled=i.smooth!==!1,e.drawImage(r,a,l,s,o))})}var JY={type:"image",tag:"image",nested:!1,attr:YY,bound:ZY,draw:KY,pick:rg(),isect:Ti,get:c3,xOffset:sg,yOffset:og},QY=u3("line",yY,NY);function eZ(e,t){var n=t.scaleX||1,i=t.scaleY||1;(n!==1||i!==1)&&e("vector-effect","non-scaling-stroke"),e("transform",MY(t)),e("d",t.path)}function ag(e,t){var n=t.path;if(n==null)return!0;var i=t.x||0,r=t.y||0,s=t.scaleX||1,o=t.scaleY||1,a=(t.angle||0)*wo,l=t.pathCache;(!l||l.path!==n)&&((t.pathCache=l=bu(n)).path=n),a&&e.rotate&&e.translate?(e.translate(i,r),e.rotate(a),vf(e,l,0,0,s,o),e.rotate(-a),e.translate(-i,-r)):vf(e,l,i,r,s,o)}function tZ(e,t){return ag($f(e,t.angle),t)?e.set(0,0,0,0):As(e,t,!0)}var nZ={type:"path",tag:"path",nested:!1,attr:eZ,bound:tZ,draw:s3(ag),pick:o3(ag),isect:n3(ag)};function iZ(e,t){e("d",xu(null,t))}function rZ(e,t){var n,i;return As(e.set(n=t.x||0,i=t.y||0,n+t.width||0,i+t.height||0),t)}function wE(e,t){e.beginPath(),xu(e,t)}var sZ={type:"rect",tag:"path",nested:!1,attr:iZ,bound:rZ,draw:s3(wE),pick:o3(wE),isect:hE};function oZ(e,t){e("transform",bE(t)),e("x2",t.x2!=null?t.x2-(t.x||0):0),e("y2",t.y2!=null?t.y2-(t.y||0):0)}function aZ(e,t){var n,i;return As(e.set(n=t.x||0,i=t.y||0,t.x2!=null?t.x2:n,t.y2!=null?t.y2:i),t)}function kE(e,t,n){var i,r,s,o;return t.stroke&&ku(e,t,n)?(i=t.x||0,r=t.y||0,s=t.x2!=null?t.x2:i,o=t.y2!=null?t.y2:r,e.beginPath(),e.moveTo(i,r),e.lineTo(s,o),!0):!1}function lZ(e,t,n){nr(t,i=>{if(!(n&&!n.intersects(i.bounds))){var r=i.opacity==null?1:i.opacity;r&&kE(e,i,r)&&(wu(e,i),e.stroke())}})}function uZ(e,t,n,i){return e.isPointInStroke?kE(e,t,1)&&e.isPointInStroke(n,i):!1}var cZ={type:"rule",tag:"line",nested:!1,attr:oZ,bound:aZ,draw:lZ,pick:rg(uZ),isect:pE},fZ=l3("shape",bY),dZ=l3("symbol",vY,i3);const $E=u4();var mi={height:Vr,measureWidth:h3,estimateWidth:lg,width:lg,canvas:EE};EE(!0);function EE(e){mi.width=e&&Eo?h3:lg}function lg(e,t){return CE(So(e,t),Vr(e))}function CE(e,t){return~~(.8*e.length*t)}function h3(e,t){return Vr(e)<=0||!(t=So(e,t))?0:SE(t,ug(e))}function SE(e,t){const n=`(${t}) ${e}`;let i=$E.get(n);return i===void 0&&(Eo.font=t,i=Eo.measureText(e).width,$E.set(n,i)),i}function Vr(e){return e.fontSize!=null?+e.fontSize||0:11}function Co(e){return e.lineHeight!=null?e.lineHeight:Vr(e)+2}function hZ(e){return q(e)?e.length>1?e:e[0]:e}function Af(e){return hZ(e.lineBreak&&e.text&&!q(e.text)?e.text.split(e.lineBreak):e.text)}function p3(e){const t=Af(e);return(q(t)?t.length-1:0)*Co(e)}function So(e,t){const n=t==null?"":(t+"").trim();return e.limit>0&&n.length?gZ(e,n):n}function pZ(e){if(mi.width===h3){const t=ug(e);return n=>SE(n,t)}else if(mi.width===lg){const t=Vr(e);return n=>CE(n,t)}else return t=>mi.width(e,t)}function gZ(e,t){var n=+e.limit,i=pZ(e);if(i(t)<n)return t;var r=e.ellipsis||"…",s=e.dir==="rtl",o=0,a=t.length,l;if(n-=i(r),s){for(;o<a;)l=o+a>>>1,i(t.slice(l))>n?o=l+1:a=l;return r+t.slice(o)}else{for(;o<a;)l=1+(o+a>>>1),i(t.slice(0,l))<n?o=l:a=l-1;return t.slice(0,o)+r}}function Tf(e,t){var n=e.font;return(t&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function ug(e,t){return(e.fontStyle?e.fontStyle+" ":"")+(e.fontVariant?e.fontVariant+" ":"")+(e.fontWeight?e.fontWeight+" ":"")+Vr(e)+"px "+Tf(e,t)}function g3(e){var t=e.baseline,n=Vr(e);return Math.round(t==="top"?.79*n:t==="middle"?.3*n:t==="bottom"?-.21*n:t==="line-top"?.29*n+.5*Co(e):t==="line-bottom"?.29*n-.5*Co(e):0)}const mZ={left:"start",center:"middle",right:"end"},Mf=new Ot;function cg(e){var t=e.x||0,n=e.y||0,i=e.radius||0,r;return i&&(r=(e.theta||0)-Na,t+=i*Math.cos(r),n+=i*Math.sin(r)),Mf.x1=t,Mf.y1=n,Mf}function yZ(e,t){var n=t.dx||0,i=(t.dy||0)+g3(t),r=cg(t),s=r.x1,o=r.y1,a=t.angle||0,l;e("text-anchor",mZ[t.align]||"start"),a?(l=Ia(s,o)+" "+a3(a),(n||i)&&(l+=" "+Ia(n,i))):l=Ia(s+n,o+i),e("transform",l)}function m3(e,t,n){var i=mi.height(t),r=t.align,s=cg(t),o=s.x1,a=s.y1,l=t.dx||0,u=(t.dy||0)+g3(t)-Math.round(.8*i),c=Af(t),f;if(q(c)?(i+=Co(t)*(c.length-1),f=c.reduce((d,h)=>Math.max(d,mi.width(t,h)),0)):f=mi.width(t,c),r==="center"?l-=f/2:r==="right"&&(l-=f),e.set(l+=o,u+=a,l+f,u+i),t.angle&&!n)e.rotate(t.angle*wo,o,a);else if(n===2)return e.rotatedPoints(t.angle*wo,o,a);return e}function bZ(e,t,n){nr(t,i=>{var r=i.opacity==null?1:i.opacity,s,o,a,l,u,c,f;if(!(n&&!n.intersects(i.bounds)||r===0||i.fontSize<=0||i.text==null||i.text.length===0)){if(e.font=ug(i),e.textAlign=i.align||"left",s=cg(i),o=s.x1,a=s.y1,i.angle&&(e.save(),e.translate(o,a),e.rotate(i.angle*wo),o=a=0),o+=i.dx||0,a+=(i.dy||0)+g3(i),c=Af(i),wu(e,i),q(c))for(u=Co(i),l=0;l<c.length;++l)f=So(i,c[l]),i.fill&&ng(e,i,r)&&e.fillText(f,o,a),i.stroke&&ku(e,i,r)&&e.strokeText(f,o,a),a+=u;else f=So(i,c),i.fill&&ng(e,i,r)&&e.fillText(f,o,a),i.stroke&&ku(e,i,r)&&e.strokeText(f,o,a);i.angle&&e.restore()}})}function vZ(e,t,n,i,r,s){if(t.fontSize<=0)return!1;if(!t.angle)return!0;var o=cg(t),a=o.x1,l=o.y1,u=m3(Mf,t,1),c=-t.angle*wo,f=Math.cos(c),d=Math.sin(c),h=f*r-d*s+(a-f*a+d*l),p=d*r+f*s+(l-d*a-f*l);return u.contains(h,p)}function xZ(e,t){const n=m3(Mf,e,2);return _u(t,n[0],n[1],n[2],n[3])||_u(t,n[0],n[1],n[4],n[5])||_u(t,n[4],n[5],n[6],n[7])||_u(t,n[2],n[3],n[6],n[7])}var _Z={type:"text",tag:"text",nested:!1,attr:yZ,bound:m3,draw:bZ,pick:rg(vZ),isect:xZ},wZ=u3("trail",xY,OY),yi={arc:FY,area:RY,group:XY,image:JY,line:QY,path:nZ,rect:sZ,rule:cZ,shape:fZ,symbol:dZ,text:_Z,trail:wZ};function y3(e,t,n){var i=yi[e.mark.marktype],r=t||i.bound;return i.nested&&(e=e.mark),r(e.bounds||(e.bounds=new Ot),e,n)}var AE={mark:null};function TE(e,t,n){var i=yi[e.marktype],r=i.bound,s=e.items,o=s&&s.length,a,l,u,c;if(i.nested)return o?u=s[0]:(AE.mark=e,u=AE),c=y3(u,r,n),t=t&&t.union(c)||c,t;if(t=t||e.bounds&&e.bounds.clear()||new Ot,o)for(a=0,l=s.length;a<l;++a)t.union(y3(s[a],r,n));return e.bounds=t}const kZ=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function ME(e,t){return JSON.stringify(e,kZ,t)}function FE(e){const t=typeof e=="string"?JSON.parse(e):e;return DE(t)}function DE(e){var t=e.marktype,n=e.items,i,r,s;if(n)for(r=0,s=n.length;r<s;++r)i=t?"mark":"group",n[r][i]=e,n[r].zindex&&(n[r][i].zdirty=!0),(t||i)==="group"&&DE(n[r]);return t&&TE(e),e}function b3(e){arguments.length?this.root=FE(e):(this.root=NE({marktype:"group",name:"root",role:"frame"}),this.root.items=[new Zp(this.root)])}b3.prototype={toJSON(e){return ME(this.root,e||0)},mark(e,t,n){t=t||this.root.items[0];const i=NE(e,t);return t.items[n]=i,i.zindex&&(i.group.zdirty=!0),i}};function NE(e,t){const n={bounds:new Ot,clip:!!e.clip,group:t,interactive:e.interactive!==!1,items:[],marktype:e.marktype,name:e.name||void 0,role:e.role||void 0,zindex:e.zindex||0};return e.aria!=null&&(n.aria=e.aria),e.description&&(n.description=e.description),n}function Ao(e,t,n){return!e&&typeof document<"u"&&document.createElement&&(e=document),e?n?e.createElementNS(n,t):e.createElement(t):null}function v3(e,t){t=t.toLowerCase();for(var n=e.childNodes,i=0,r=n.length;i<r;++i)if(n[i].tagName.toLowerCase()===t)return n[i]}function Pt(e,t,n,i){var r=e.childNodes[t],s;return(!r||r.tagName.toLowerCase()!==n.toLowerCase())&&(s=r||null,r=Ao(e.ownerDocument,n,i),e.insertBefore(r,s)),r}function Ri(e,t){for(var n=e.childNodes,i=n.length;i>t;)e.removeChild(n[--i]);return e}function OE(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function fg(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function $Z(e,t,n,i){var r=e&&e.mark,s,o;if(r&&(s=yi[r.marktype]).tip){for(o=fg(t,n),o[0]-=i[0],o[1]-=i[1];e=e.mark.group;)o[0]-=e.x||0,o[1]-=e.y||0;e=s.tip(r.items,o)}return e}function To(e,t){this._active=null,this._handlers={},this._loader=e||ep(),this._tooltip=t||EZ}function EZ(e,t,n,i){e.element().setAttribute("title",i||"")}To.prototype={initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,n){for(let i=e?e.length:0;--i>=0;)if(e[i].type===t&&(!n||e[i].handler===n))return i;return-1},handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const i in t)n.push(...t[i]);return n},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then(i=>{const r=new MouseEvent(e.type,e),s=Ao(null,"a");for(const o in i)s.setAttribute(o,i[o]);s.dispatchEvent(r)}).catch(()=>{})},handleTooltip(e,t,n){if(t&&t.tooltip!=null){t=$Z(t,e,this.canvas(),this._origin);const i=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,i)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),i=this._origin,r=e.bounds,s=r.width(),o=r.height();let a=r.x1+i[0]+n.left,l=r.y1+i[1]+n.top;for(;e.mark&&(e=e.mark.group);)a+=e.x||0,l+=e.y||0;return{x:a,y:l,width:s,height:o,left:a,top:l,right:a+s,bottom:l+o}}};function bi(e){this._el=null,this._bgcolor=null,this._loader=new Yb(e)}bi.prototype={initialize(e,t,n,i,r){return this._el=e,this.resize(t,n,i,r)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return arguments.length===0?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,n,i){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=i||1,this},dirty(){},render(e,t){const n=this;return n._call=function(){n._render(e,t)},n._call(),n._call=null,n},_render(){},renderAsync(e,t){const n=this.render(e,t);return this._ready?this._ready.then(()=>n):Promise.resolve(n)},_load(e,t){var n=this,i=n._loader[e](t);if(!n._ready){const r=n._call;n._ready=n._loader.ready().then(s=>{s&&r(),n._ready=null})}return i},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const CZ="keydown",SZ="keypress",AZ="keyup",RE="dragenter",dg="dragleave",LE="dragover",x3="pointerdown",TZ="pointerup",hg="pointermove",Ff="pointerout",IE="pointerover",_3="mousedown",MZ="mouseup",zE="mousemove",w3="mouseout",PE="mouseover",pg="click",FZ="dblclick",DZ="wheel",BE="mousewheel",gg="touchstart",mg="touchmove",yg="touchend",NZ=[CZ,SZ,AZ,RE,dg,LE,x3,TZ,hg,Ff,IE,_3,MZ,zE,w3,PE,pg,FZ,DZ,BE,gg,mg,yg],k3=hg,Df=Ff,$3=pg;function Mo(e,t){To.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}const OZ=e=>e===gg||e===mg||e===yg?[gg,mg,yg]:[e];function jE(e,t){OZ(t).forEach(n=>RZ(e,n))}function RZ(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}function Nf(e,t,n){t.forEach(i=>e.fire(i,n))}function UE(e,t,n){return function(i){const r=this._active,s=this.pickEvent(i);s===r?Nf(this,e,i):((!r||!r.exit)&&Nf(this,n,i),this._active=s,Nf(this,t,i),Nf(this,e,i))}}function qE(e){return function(t){Nf(this,e,t),this._active=null}}K(Mo,To,{initialize(e,t,n){return this._canvas=e&&v3(e,"canvas"),[pg,_3,x3,hg,Ff,dg].forEach(i=>jE(this,i)),To.prototype.initialize.call(this,e,t,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:NZ,DOMMouseScroll(e){this.fire(BE,e)},pointermove:UE([hg,zE],[IE,PE],[Ff,w3]),dragover:UE([LE],[RE],[dg]),pointerout:qE([Ff,w3]),dragleave:qE([dg]),pointerdown(e){this._down=this._active,this.fire(x3,e)},mousedown(e){this._down=this._active,this.fire(_3,e)},click(e){this._down===this._active&&(this.fire(pg,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(gg,e,!0)},touchmove(e){this.fire(mg,e,!0)},touchend(e){this.fire(yg,e,!0),this._touch=null},fire(e,t,n){const i=n?this._touch:this._active,r=this._handlers[e];if(t.vegaType=e,e===$3&&i&&i.href?this.handleHref(t,i,i.href):(e===k3||e===Df)&&this.handleTooltip(t,i,e!==Df),r)for(let s=0,o=r.length;s<o;++s)r[s].handler.call(this._obj,t,i)},on(e,t){const n=this.eventName(e),i=this._handlers;return this._handlerIndex(i[n],e,t)<0&&(jE(this,e),(i[n]||(i[n]=[])).push({type:e,handler:t})),this},off(e,t){const n=this.eventName(e),i=this._handlers[n],r=this._handlerIndex(i,e,t);return r>=0&&i.splice(r,1),this},pickEvent(e){const t=fg(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},pick(e,t,n,i,r){const s=this.context();return yi[e.marktype].pick.call(this,s,e,t,n,i,r)}});function LZ(){return typeof window<"u"&&window.devicePixelRatio||1}var IZ=LZ();function zZ(e,t,n,i,r,s){const o=typeof HTMLElement<"u"&&e instanceof HTMLElement&&e.parentNode!=null,a=e.getContext("2d"),l=o?IZ:r;e.width=t*l,e.height=n*l;for(const u in s)a[u]=s[u];return o&&l!==1&&(e.style.width=t+"px",e.style.height=n+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*i[0],l*i[1]),e}function Of(e){bi.call(this,e),this._options={},this._redraw=!1,this._dirty=new Ot,this._tempb=new Ot}const WE=bi.prototype,PZ=(e,t,n)=>new Ot().set(0,0,t,n).translate(-e[0],-e[1]);function BZ(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-(n[0]%1),-(n[1]%1)),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}K(Of,bi,{initialize(e,t,n,i,r,s){return this._options=s||{},this._canvas=this._options.externalContext?null:mo(1,1,this._options.type),e&&this._canvas&&(Ri(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),WE.initialize.call(this,e,t,n,i,r)},resize(e,t,n,i){if(WE.resize.call(this,e,t,n,i),this._canvas)zZ(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const r=this._options.externalContext;r||U("CanvasRenderer is missing a valid canvas or context"),r.scale(this._scale,this._scale),r.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)},_render(e,t){const n=this.context(),i=this._origin,r=this._width,s=this._height,o=this._dirty,a=PZ(i,r,s);n.save();const l=this._redraw||o.empty()?(this._redraw=!1,a.expand(1)):BZ(n,a.intersect(o),i);return this.clear(-i[0],-i[1],r,s),this.draw(n,e,l,t),n.restore(),o.clear(),this},draw(e,t,n,i){if(t.marktype!=="group"&&i!=null&&!i.includes(t.marktype))return;const r=yi[t.marktype];t.clip&&LY(e,t),r.draw.call(this,e,t,n,i),t.clip&&e.restore()},clear(e,t,n,i){const r=this._options,s=this.context();r.type!=="pdf"&&!r.externalContext&&s.clearRect(e,t,n,i),this._bgcolor!=null&&(s.fillStyle=this._bgcolor,s.fillRect(e,t,n,i))}});function E3(e,t){To.call(this,e,t);const n=this;n._hrefHandler=C3(n,(i,r)=>{r&&r.href&&n.handleHref(i,r,r.href)}),n._tooltipHandler=C3(n,(i,r)=>{n.handleTooltip(i,r,i.type!==Df)})}const C3=(e,t)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i,n.vegaType=n.type,t.call(e._obj,n,i)};K(E3,To,{initialize(e,t,n){let i=this._svg;return i&&(i.removeEventListener($3,this._hrefHandler),i.removeEventListener(k3,this._tooltipHandler),i.removeEventListener(Df,this._tooltipHandler)),this._svg=i=e&&v3(e,"svg"),i&&(i.addEventListener($3,this._hrefHandler),i.addEventListener(k3,this._tooltipHandler),i.addEventListener(Df,this._tooltipHandler)),To.prototype.initialize.call(this,e,t,n)},canvas(){return this._svg},on(e,t){const n=this.eventName(e),i=this._handlers;if(this._handlerIndex(i[n],e,t)<0){const s={type:e,handler:t,listener:C3(this,t)};(i[n]||(i[n]=[])).push(s),this._svg&&this._svg.addEventListener(n,s.listener)}return this},off(e,t){const n=this.eventName(e),i=this._handlers[n],r=this._handlerIndex(i,e,t);return r>=0&&(this._svg&&this._svg.removeEventListener(n,i[r].listener),i.splice(r,1)),this}});const HE="aria-hidden",S3="aria-label",A3="role",T3="aria-roledescription",GE="graphics-object",M3="graphics-symbol",VE=(e,t,n)=>({[A3]:e,[T3]:t,[S3]:n||void 0}),jZ=Ki(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),XE={axis:{desc:"axis",caption:WZ},legend:{desc:"legend",caption:HZ},"title-text":{desc:"title",caption:e=>`Title text '${JE(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${JE(e)}'`}},YE={ariaRole:A3,ariaRoleDescription:T3,description:S3};function ZE(e,t){const n=t.aria===!1;if(e(HE,n||void 0),n||t.description==null)for(const i in YE)e(YE[i],void 0);else{const i=t.mark.marktype;e(S3,t.description),e(A3,t.ariaRole||(i==="group"?GE:M3)),e(T3,t.ariaRoleDescription||`${i} mark`)}}function KE(e){return e.aria===!1?{[HE]:!0}:jZ[e.role]?null:XE[e.role]?qZ(e,XE[e.role]):UZ(e)}function UZ(e){const t=e.marktype,n=t==="group"||t==="text"||e.items.some(i=>i.description!=null&&i.aria!==!1);return VE(n?GE:M3,`${t} mark container`,e.description)}function qZ(e,t){try{const n=e.items[0],i=t.caption||(()=>"");return VE(t.role||M3,t.desc,n.description||i(n))}catch{return null}}function JE(e){return ee(e.text).join(" ")}function WZ(e){const t=e.datum,n=e.orient,i=t.title?QE(e):null,r=e.context,s=r.scales[t.scale].value,o=r.dataflow.locale(),a=s.type;return`${n==="left"||n==="right"?"Y":"X"}-axis`+(i?` titled '${i}'`:"")+` for a ${yu(a)?"discrete":a} scale with ${V$(o,s,e)}`}function HZ(e){const t=e.datum,n=t.title?QE(e):null,i=`${t.type||""} legend`.trim(),r=t.scales,s=Object.keys(r),o=e.context,a=o.scales[r[s[0]]].value,l=o.dataflow.locale();return VZ(i)+(n?` titled '${n}'`:"")+` for ${GZ(s)} with ${V$(l,a,e)}`}function QE(e){try{return ee(Ue(e.items).items[0].text).join(" ")}catch{return null}}function GZ(e){return e=e.map(t=>t+(t==="fill"||t==="stroke"?" color":"")),e.length<2?e[0]:e.slice(0,-1).join(", ")+" and "+Ue(e)}function VZ(e){return e.length?e[0].toUpperCase()+e.slice(1):e}const eC=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),XZ=e=>eC(e).replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
");function F3(){let e="",t="",n="";const i=[],r=()=>t=n="",s=l=>{t&&(e+=`${t}>${n}`,r()),i.push(l)},o=(l,u)=>(u!=null&&(t+=` ${l}="${XZ(u)}"`),a),a={open(l){s(l),t="<"+l;for(var u=arguments.length,c=new Array(u>1?u-1:0),f=1;f<u;f++)c[f-1]=arguments[f];for(const d of c)for(const h in d)o(h,d[h]);return a},close(){const l=i.pop();return t?e+=t+(n?`>${n}</${l}>`:"/>"):e+=`</${l}>`,r(),a},attr:o,text:l=>(n+=eC(l),a),toString:()=>e};return a}const tC=e=>nC(F3(),e)+"";function nC(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,i=n.length;for(let r=0;r<i;++r)e.attr(n[r].name,n[r].value)}if(t.hasChildNodes()){const n=t.childNodes;for(const i of n)i.nodeType===3?e.text(i.nodeValue):nC(e,i)}return e.close()}const bg={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity"},vg={blend:"mix-blend-mode"},iC={fill:"none","stroke-miterlimit":10},Rf=0,rC="http://www.w3.org/2000/xmlns/",Bt=Sf.xmlns;function xg(e){bi.call(this,e),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}const D3=bi.prototype;K(xg,bi,{initialize(e,t,n,i,r){return this._defs={},this._clearDefs(),e&&(this._svg=Pt(e,0,"svg",Bt),this._svg.setAttributeNS(rC,"xmlns",Bt),this._svg.setAttributeNS(rC,"xmlns:xlink",Sf["xmlns:xlink"]),this._svg.setAttribute("version",Sf.version),this._svg.setAttribute("class","marks"),Ri(e,1),this._root=Pt(this._svg,Rf,"g",Bt),Fo(this._root,iC),Ri(this._svg,Rf+1)),this.background(this._bgcolor),D3.initialize.call(this,e,t,n,i,r)},background(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),D3.background.apply(this,arguments)},resize(e,t,n,i){return D3.resize.call(this,e,t,n,i),this._svg&&(Fo(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const e=this._svg,t=this._bgcolor;if(!e)return null;let n;t&&(e.removeAttribute("style"),n=Pt(e,Rf,"rect",Bt),Fo(n,{width:this._width,height:this._height,fill:t}));const i=tC(e);return t&&(e.removeChild(n),this._svg.style.setProperty("background-color",t)),i},_render(e,t){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,e,void 0,t),Ri(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},isDirty(e){return this._dirtyAll||!e._svg||!e._svg.ownerSVGElement||e.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const e=this._dirty;if(!e.length||!this._dirtyID)return!0;const t=++this._dirtyID;let n,i,r,s,o,a,l;for(o=0,a=e.length;o<a;++o)if(n=e[o],i=n.mark,i.marktype!==r&&(r=i.marktype,s=yi[r]),i.zdirty&&i.dirty!==t&&(this._dirtyAll=!1,sC(n,t),i.items.forEach(u=>{u.dirty=t})),!i.zdirty){if(n.exit){s.nested&&i.items.length?(l=i.items[0],l._svg&&this._update(s,l._svg,l)):n._svg&&(l=n._svg.parentNode,l&&l.removeChild(n._svg)),n._svg=null;continue}n=s.nested?i.items[0]:n,n._update!==t&&(!n._svg||!n._svg.ownerSVGElement?(this._dirtyAll=!1,sC(n,t)):this._update(s,n._svg,n),n._update=t)}return!this._dirtyAll},mark(e,t,n,i){if(!this.isDirty(t))return t._svg;const r=this._svg,s=t.marktype,o=yi[s],a=t.interactive===!1?"none":null,l=o.tag==="g",u=oC(t,e,n,"g",r);if(s!=="group"&&i!=null&&!i.includes(s))return Ri(u,0),t._svg;u.setAttribute("class",OE(t));const c=KE(t);for(const p in c)An(u,p,c[p]);l||An(u,"pointer-events",a),An(u,"clip-path",t.clip?Xb(this,t,t.group):null);let f=null,d=0;const h=p=>{const g=this.isDirty(p),m=oC(p,u,f,o.tag,r);g&&(this._update(o,m,p),l&&KZ(this,m,p,i)),f=m,++d};return o.nested?t.items.length&&h(t.items[0]):nr(t,h),Ri(u,d),u},_update(e,t,n){Ts=t,vn=t.__values__,ZE(Lf,n),e.attr(Lf,n,this);const i=QZ[e.type];i&&i.call(this,e,t,n),Ts&&this.style(Ts,n)},style(e,t){if(t!=null){for(const n in bg){let i=n==="font"?Tf(t):t[n];if(i===vn[n])continue;const r=bg[n];i==null?e.removeAttribute(r):(Ub(i)&&(i=Y$(i,this._defs.gradient,aC())),e.setAttribute(r,i+"")),vn[n]=i}for(const n in vg)_g(e,vg[n],t[n])}},defs(){const e=this._svg,t=this._defs;let n=t.el,i=0;for(const r in t.gradient)n||(t.el=n=Pt(e,Rf+1,"defs",Bt)),i=YZ(n,t.gradient[r],i);for(const r in t.clipping)n||(t.el=n=Pt(e,Rf+1,"defs",Bt)),i=ZZ(n,t.clipping[r],i);n&&(i===0?(e.removeChild(n),t.el=null):Ri(n,i))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});function sC(e,t){for(;e&&e.dirty!==t;e=e.mark.group)if(e.dirty=t,e.mark&&e.mark.dirty!==t)e.mark.dirty=t;else return}function YZ(e,t,n){let i,r,s;if(t.gradient==="radial"){let o=Pt(e,n++,"pattern",Bt);Fo(o,{id:Gp+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),o=Pt(o,0,"rect",Bt),Fo(o,{width:1,height:1,fill:`url(${aC()}#${t.id})`}),e=Pt(e,n++,"radialGradient",Bt),Fo(e,{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else e=Pt(e,n++,"linearGradient",Bt),Fo(e,{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(i=0,r=t.stops.length;i<r;++i)s=Pt(e,i,"stop",Bt),s.setAttribute("offset",t.stops[i].offset),s.setAttribute("stop-color",t.stops[i].color);return Ri(e,i),n}function ZZ(e,t,n){let i;return e=Pt(e,n,"clipPath",Bt),e.setAttribute("id",t.id),t.path?(i=Pt(e,0,"path",Bt),i.setAttribute("d",t.path)):(i=Pt(e,0,"rect",Bt),Fo(i,{x:0,y:0,width:t.width,height:t.height})),Ri(e,1),n+1}function KZ(e,t,n,i){t=t.lastChild.previousSibling;let r,s=0;nr(n,o=>{r=e.mark(t,o,r,i),++s}),Ri(t,1+s)}function oC(e,t,n,i,r){let s=e._svg,o;if(!s&&(o=t.ownerDocument,s=Ao(o,i,Bt),e._svg=s,e.mark&&(s.__data__=e,s.__values__={fill:"default"},i==="g"))){const a=Ao(o,"path",Bt);s.appendChild(a),a.__data__=e;const l=Ao(o,"g",Bt);s.appendChild(l),l.__data__=e;const u=Ao(o,"path",Bt);s.appendChild(u),u.__data__=e,u.__values__={fill:"default"}}return(s.ownerSVGElement!==r||JZ(s,n))&&t.insertBefore(s,n?n.nextSibling:t.firstChild),s}function JZ(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}let Ts=null,vn=null;const QZ={group(e,t,n){const i=Ts=t.childNodes[2];vn=i.__values__,e.foreground(Lf,n,this),vn=t.__values__,Ts=t.childNodes[1],e.content(Lf,n,this);const r=Ts=t.childNodes[0];e.background(Lf,n,this);const s=n.mark.interactive===!1?"none":null;if(s!==vn.events&&(An(i,"pointer-events",s),An(r,"pointer-events",s),vn.events=s),n.strokeForeground&&n.stroke){const o=n.fill;An(i,"display",null),this.style(r,n),An(r,"stroke",null),o&&(n.fill=null),vn=i.__values__,this.style(i,n),o&&(n.fill=o),Ts=null}else An(i,"display","none")},image(e,t,n){n.smooth===!1?(_g(t,"image-rendering","optimizeSpeed"),_g(t,"image-rendering","pixelated")):_g(t,"image-rendering",null)},text(e,t,n){const i=Af(n);let r,s,o,a;q(i)?(s=i.map(l=>So(n,l)),r=s.join(`
|
|
67
|
+
`),r!==vn.text&&(Ri(t,0),o=t.ownerDocument,a=Co(n),s.forEach((l,u)=>{const c=Ao(o,"tspan",Bt);c.__data__=n,c.textContent=l,u&&(c.setAttribute("x",0),c.setAttribute("dy",a)),t.appendChild(c)}),vn.text=r)):(s=So(n,i),s!==vn.text&&(t.textContent=s,vn.text=s)),An(t,"font-family",Tf(n)),An(t,"font-size",Vr(n)+"px"),An(t,"font-style",n.fontStyle),An(t,"font-variant",n.fontVariant),An(t,"font-weight",n.fontWeight)}};function Lf(e,t,n){t!==vn[e]&&(n?eK(Ts,e,t,n):An(Ts,e,t),vn[e]=t)}function _g(e,t,n){n!==vn[t]&&(n==null?e.style.removeProperty(t):e.style.setProperty(t,n+""),vn[t]=n)}function Fo(e,t){for(const n in t)An(e,n,t[n])}function An(e,t,n){n!=null?e.setAttribute(t,n):e.removeAttribute(t)}function eK(e,t,n,i){n!=null?e.setAttributeNS(i,t,n):e.removeAttributeNS(i,t)}function aC(){let e;return typeof window>"u"?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function N3(e){bi.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}K(N3,bi,{svg(){return this._text},_render(e){const t=F3();t.open("svg",Fe({},Sf,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&n!=="transparent"&&n!=="none"&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",iC,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const n=yi[t.marktype],i=n.tag,r=[ZE,n.attr];e.open("g",{class:OE(t),"clip-path":t.clip?Xb(this,t,t.group):null},KE(t),{"pointer-events":i!=="g"&&t.interactive===!1?"none":null});const s=o=>{const a=this.href(o);if(a&&e.open("a",a),e.open(i,this.attr(t,o,r,i!=="g"?i:null)),i==="text"){const l=Af(o);if(q(l)){const u={x:0,dy:Co(o)};for(let c=0;c<l.length;++c)e.open("tspan",c?u:null).text(So(o,l[c])).close()}else e.text(So(o,l))}else if(i==="g"){const l=o.strokeForeground,u=o.fill,c=o.stroke;l&&c&&(o.stroke=null),e.open("path",this.attr(t,o,n.background,"bgrect")).close(),e.open("g",this.attr(t,o,n.content)),nr(o,f=>this.mark(e,f)),e.close(),l&&c?(u&&(o.fill=null),o.stroke=c,e.open("path",this.attr(t,o,n.foreground,"bgrect")).close(),u&&(o.fill=u)):e.open("path",this.attr(t,o,n.foreground,"bgfore")).close()}e.close(),a&&e.close()};return n.nested?t.items&&t.items.length&&s(t.items[0]):nr(t,s),e.close()},href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then(i=>{i["xlink:href"]=i.href,i.href=null,(this._hrefs||(this._hrefs={}))[t]=i})}return null},attr(e,t,n,i){const r={},s=(o,a,l,u)=>{r[u||o]=a};return Array.isArray(n)?n.forEach(o=>o(s,t,this)):n(s,t,this),i&&tK(r,t,e,i,this._defs),r},defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(Object.keys(t).length+Object.keys(n).length!==0){e.open("defs");for(const r in t){const s=t[r],o=s.stops;s.gradient==="radial"?(e.open("pattern",{id:Gp+r,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+r+")"}).close(),e.close(),e.open("radialGradient",{id:r,fx:s.x1,fy:s.y1,fr:s.r1,cx:s.x2,cy:s.y2,r:s.r2})):e.open("linearGradient",{id:r,x1:s.x1,x2:s.x2,y1:s.y1,y2:s.y2});for(let a=0;a<o.length;++a)e.open("stop",{offset:o[a].offset,"stop-color":o[a].color}).close();e.close()}for(const r in n){const s=n[r];e.open("clipPath",{id:r}),s.path?e.open("path",{d:s.path}).close():e.open("rect",{x:0,y:0,width:s.width,height:s.height}).close(),e.close()}e.close()}}});function tK(e,t,n,i,r){let s;if(t==null||(i==="bgrect"&&n.interactive===!1&&(e["pointer-events"]="none"),i==="bgfore"&&(n.interactive===!1&&(e["pointer-events"]="none"),e.display="none",t.fill!==null)))return e;i==="image"&&t.smooth===!1&&(s=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]),i==="text"&&(e["font-family"]=Tf(t),e["font-size"]=Vr(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const o in bg){let a=t[o];const l=bg[o];a==="transparent"&&(l==="fill"||l==="stroke")||a!=null&&(Ub(a)&&(a=Y$(a,r.gradient,"")),e[l]=a)}for(const o in vg){const a=t[o];a!=null&&(s=s||[],s.push(`${vg[o]}: ${a};`))}return s&&(e.style=s.join(" ")),e}const ir={svgMarkTypes:["text"],svgOnTop:!0,debug:!1};function nK(e){ir.svgMarkTypes=e.svgMarkTypes??["text"],ir.svgOnTop=e.svgOnTop??!0,ir.debug=e.debug??!1}function wg(e){bi.call(this,e),this._svgRenderer=new xg(e),this._canvasRenderer=new Of(e)}const lC=bi.prototype;K(wg,bi,{initialize(e,t,n,i,r){this._root_el=Pt(e,0,"div");const s=Pt(this._root_el,0,"div"),o=Pt(this._root_el,1,"div");return this._root_el.style.position="relative",ir.debug||(s.style.height="100%",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.height="100%",o.style.width="100%"),this._svgEl=ir.svgOnTop?o:s,this._canvasEl=ir.svgOnTop?s:o,this._svgEl.style.pointerEvents="none",this._canvasRenderer.initialize(this._canvasEl,t,n,i,r),this._svgRenderer.initialize(this._svgEl,t,n,i,r),lC.initialize.call(this,e,t,n,i,r)},dirty(e){return ir.svgMarkTypes.includes(e.mark.marktype)?this._svgRenderer.dirty(e):this._canvasRenderer.dirty(e),this},_render(e,t){const i=(t??["arc","area","image","line","path","rect","rule","shape","symbol","text","trail"]).filter(r=>!ir.svgMarkTypes.includes(r));this._svgRenderer.render(e,ir.svgMarkTypes),this._canvasRenderer.render(e,i)},resize(e,t,n,i){return lC.resize.call(this,e,t,n,i),this._svgRenderer.resize(e,t,n,i),this._canvasRenderer.resize(e,t,n,i),this},background(e){return ir.svgOnTop?this._canvasRenderer.background(e):this._svgRenderer.background(e),this}});function O3(e,t){Mo.call(this,e,t)}K(O3,Mo,{initialize(e,t,n){const i=Pt(Pt(e,0,"div"),ir.svgOnTop?0:1,"div");return Mo.prototype.initialize.call(this,i,t,n)}});const uC="canvas",cC="hybrid",fC="png",dC="svg",hC="none",Do={Canvas:uC,PNG:fC,SVG:dC,Hybrid:cC,None:hC},za={};za[uC]=za[fC]={renderer:Of,headless:Of,handler:Mo},za[dC]={renderer:xg,headless:N3,handler:E3},za[cC]={renderer:wg,headless:wg,handler:O3},za[hC]={};function kg(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(za[e]=t,this):za[e]}function pC(e,t,n){const i=[],r=new Ot().union(t),s=e.marktype;return s?gC(e,r,n,i):s==="group"?mC(e,r,n,i):U("Intersect scene must be mark node or group item.")}function gC(e,t,n,i){if(iK(e,t,n)){const r=e.items,s=e.marktype,o=r.length;let a=0;if(s==="group")for(;a<o;++a)mC(r[a],t,n,i);else for(const l=yi[s].isect;a<o;++a){const u=r[a];yC(u,t,l)&&i.push(u)}}return i}function iK(e,t,n){return e.bounds&&t.intersects(e.bounds)&&(e.marktype==="group"||e.interactive!==!1&&(!n||n(e)))}function mC(e,t,n,i){n&&n(e.mark)&&yC(e,t,yi.group.isect)&&i.push(e);const r=e.items,s=r&&r.length;if(s){const o=e.x||0,a=e.y||0;t.translate(-o,-a);for(let l=0;l<s;++l)gC(r[l],t,n,i);t.translate(o,a)}return i}function yC(e,t,n){const i=e.bounds;return t.encloses(i)||t.intersects(i)&&n(e,t)}const R3=new Ot;function bC(e){const t=e.clip;if(Me(t))t($f(R3.clear()));else if(t)R3.set(0,0,e.group.width,e.group.height);else return;e.bounds.intersect(R3)}const rK=1e-9;function L3(e,t,n){return e===t?!0:n==="path"?vC(e,t):e instanceof Date&&t instanceof Date?+e==+t:Xe(e)&&Xe(t)?Math.abs(e-t)<=rK:!e||!t||!ie(e)&&!ie(t)?e==t:sK(e,t)}function vC(e,t){return L3(bu(e),bu(t))}function sK(e,t){var n=Object.keys(e),i=Object.keys(t),r,s;if(n.length!==i.length)return!1;for(n.sort(),i.sort(),s=n.length-1;s>=0;s--)if(n[s]!=i[s])return!1;for(s=n.length-1;s>=0;s--)if(r=n[s],!L3(e[r],t[r],r))return!1;return typeof e==typeof t}function oK(){oE(),TX()}const $u="top",rr="left",sr="right",No="bottom",aK="top-left",lK="top-right",uK="bottom-left",cK="bottom-right",I3="start",z3="middle",Tn="end",fK="x",dK="y",$g="group",P3="axis",B3="title",hK="frame",pK="scope",j3="legend",xC="row-header",_C="row-footer",wC="row-title",kC="column-header",$C="column-footer",EC="column-title",gK="padding",mK="symbol",CC="fit",SC="fit-x",AC="fit-y",yK="pad",U3="none",Eg="all",q3="each",W3="flush",Oo="column",Ro="row";function TC(e){I.call(this,null,e)}K(TC,I,{transform(e,t){const n=t.dataflow,i=e.mark,r=i.marktype,s=yi[r],o=s.bound;let a=i.bounds,l;if(s.nested)i.items.length&&n.dirty(i.items[0]),a=Cg(i,o),i.items.forEach(u=>{u.bounds.clear().union(a)});else if(r===$g||e.modified())switch(t.visit(t.MOD,u=>n.dirty(u)),a.clear(),i.items.forEach(u=>a.union(Cg(u,o))),i.role){case P3:case j3:case B3:t.reflow()}else l=t.changed(t.REM),t.visit(t.ADD,u=>{a.union(Cg(u,o))}),t.visit(t.MOD,u=>{l=l||a.alignsWith(u.bounds),n.dirty(u),a.union(Cg(u,o))}),l&&(a.clear(),i.items.forEach(u=>a.union(u.bounds)));return bC(i),t.modifies("bounds")}});function Cg(e,t,n){return t(e.bounds.clear(),e,n)}const MC=":vega_identifier:";function H3(e){I.call(this,0,e)}H3.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},K(H3,I,{transform(e,t){const n=bK(t.dataflow),i=e.as;let r=n.value;return t.visit(t.ADD,s=>s[i]=s[i]||++r),n.set(this.value=r),t}});function bK(e){return e._signals[MC]||(e._signals[MC]=e.add(0))}function FC(e){I.call(this,null,e)}K(FC,I,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,vK(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const i=n.marktype===$g?Zp:Yp;return t.visit(t.ADD,r=>i.call(r,n)),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});function vK(e){const t=e.groups,n=e.parent;return t&&t.size===1?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}function DC(e){I.call(this,null,e)}const NC={parity:e=>e.filter((t,n)=>n%2?t.opacity=0:1),greedy:(e,t)=>{let n;return e.filter((i,r)=>!r||!OC(n.bounds,i.bounds,t)?(n=i,1):i.opacity=0)}},OC=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),RC=(e,t)=>{for(var n=1,i=e.length,r=e[0].bounds,s;n<i;r=s,++n)if(OC(r,s=e[n].bounds,t))return!0},xK=e=>{const t=e.bounds;return t.width()>1&&t.height()>1},_K=(e,t,n)=>{var i=e.range(),r=new Ot;return t===$u||t===No?r.set(i[0],-1/0,i[1],1/0):r.set(-1/0,i[0],1/0,i[1]),r.expand(n||1),s=>r.encloses(s.bounds)},LC=e=>(e.forEach(t=>t.opacity=1),e),IC=(e,t)=>e.reflow(t.modified()).modifies("opacity");K(DC,I,{transform(e,t){const n=NC[e.method]||NC.parity,i=e.separation||0;let r=t.materialize(t.SOURCE).source,s,o;if(!r||!r.length)return;if(!e.method)return e.modified("method")&&(LC(r),t=IC(t,e)),t;if(r=r.filter(xK),!r.length)return;if(e.sort&&(r=r.slice().sort(e.sort)),s=LC(r),t=IC(t,e),s.length>=3&&RC(s,i)){do s=n(s,i);while(s.length>=3&&RC(s,i));s.length<3&&!Ue(r).opacity&&(s.length>1&&(Ue(s).opacity=0),Ue(r).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(o=_K(e.boundScale,e.boundOrient,+e.boundTolerance),r.forEach(l=>{o(l)||(l.opacity=0)}));const a=s[0].mark.bounds.clear();return r.forEach(l=>{l.opacity&&a.union(l.bounds)}),t}});function zC(e){I.call(this,null,e)}K(zC,I,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,i=>n.dirty(i)),t.fields&&t.fields.zindex){const i=t.source&&t.source[0];i&&(i.mark.zdirty=!0)}}});const xn=new Ot;function Eu(e,t,n){return e[t]===n?0:(e[t]=n,1)}function wK(e){var t=e.items[0].orient;return t===rr||t===sr}function kK(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}function $K(e,t,n,i){var r=t.items[0],s=r.datum,o=r.translate!=null?r.translate:.5,a=r.orient,l=kK(s),u=r.range,c=r.offset,f=r.position,d=r.minExtent,h=r.maxExtent,p=s.title&&r.items[l[2]].items[0],g=r.titlePadding,m=r.bounds,y=p&&p3(p),b=0,v=0,x,_;switch(xn.clear().union(m),m.clear(),(x=l[0])>-1&&m.union(r.items[x].bounds),(x=l[1])>-1&&m.union(r.items[x].bounds),a){case $u:b=f||0,v=-c,_=Math.max(d,Math.min(h,-m.y1)),m.add(0,-_).add(u,0),p&&Sg(e,p,_,g,y,0,-1,m);break;case rr:b=-c,v=f||0,_=Math.max(d,Math.min(h,-m.x1)),m.add(-_,0).add(0,u),p&&Sg(e,p,_,g,y,1,-1,m);break;case sr:b=n+c,v=f||0,_=Math.max(d,Math.min(h,m.x2)),m.add(0,0).add(_,u),p&&Sg(e,p,_,g,y,1,1,m);break;case No:b=f||0,v=i+c,_=Math.max(d,Math.min(h,m.y2)),m.add(0,0).add(u,_),p&&Sg(e,p,_,g,0,0,1,m);break;default:b=r.x,v=r.y}return As(m.translate(b,v),r),Eu(r,"x",b+o)|Eu(r,"y",v+o)&&(r.bounds=xn,e.dirty(r),r.bounds=m,e.dirty(r)),r.mark.bounds.clear().union(m)}function Sg(e,t,n,i,r,s,o,a){const l=t.bounds;if(t.auto){const u=o*(n+r+i);let c=0,f=0;e.dirty(t),s?c=(t.x||0)-(t.x=u):f=(t.y||0)-(t.y=u),t.mark.bounds.clear().union(l.translate(-c,-f)),e.dirty(t)}a.union(l)}const PC=(e,t)=>Math.floor(Math.min(e,t)),BC=(e,t)=>Math.ceil(Math.max(e,t));function EK(e){var t=e.items,n=t.length,i=0,r,s;const o={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i<n;++i)if(r=t[i],s=r.items,r.marktype===$g)switch(r.role){case P3:case j3:case B3:break;case xC:o.rowheaders.push(...s);break;case _C:o.rowfooters.push(...s);break;case kC:o.colheaders.push(...s);break;case $C:o.colfooters.push(...s);break;case wC:o.rowtitle=s[0];break;case EC:o.coltitle=s[0];break;default:o.marks.push(...s)}return o}function CK(e){return new Ot().set(0,0,e.width||0,e.height||0)}function SK(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function xt(e,t,n){const i=ie(e)?e[t]:e;return i??(n!==void 0?n:0)}function jC(e){return e<0?Math.ceil(-e):0}function UC(e,t,n){var i=!n.nodirty,r=n.bounds===W3?CK:SK,s=xn.set(0,0,0,0),o=xt(n.align,Oo),a=xt(n.align,Ro),l=xt(n.padding,Oo),u=xt(n.padding,Ro),c=n.columns||t.length,f=c<=0?1:Math.ceil(t.length/c),d=t.length,h=Array(d),p=Array(c),g=0,m=Array(d),y=Array(f),b=0,v=Array(d),x=Array(d),_=Array(d),k,w,$,S,E,A,R,C,M,T,O;for(w=0;w<c;++w)p[w]=0;for(w=0;w<f;++w)y[w]=0;for(w=0;w<d;++w)A=t[w],E=_[w]=r(A),A.x=A.x||0,v[w]=0,A.y=A.y||0,x[w]=0,$=w%c,S=~~(w/c),g=Math.max(g,R=Math.ceil(E.x2)),b=Math.max(b,C=Math.ceil(E.y2)),p[$]=Math.max(p[$],R),y[S]=Math.max(y[S],C),h[w]=l+jC(E.x1),m[w]=u+jC(E.y1),i&&e.dirty(t[w]);for(w=0;w<d;++w)w%c===0&&(h[w]=0),w<c&&(m[w]=0);if(o===q3)for($=1;$<c;++$){for(O=0,w=$;w<d;w+=c)O<h[w]&&(O=h[w]);for(w=$;w<d;w+=c)h[w]=O+p[$-1]}else if(o===Eg){for(O=0,w=0;w<d;++w)w%c&&O<h[w]&&(O=h[w]);for(w=0;w<d;++w)w%c&&(h[w]=O+g)}else for(o=!1,$=1;$<c;++$)for(w=$;w<d;w+=c)h[w]+=p[$-1];if(a===q3)for(S=1;S<f;++S){for(O=0,w=S*c,k=w+c;w<k;++w)O<m[w]&&(O=m[w]);for(w=S*c;w<k;++w)m[w]=O+y[S-1]}else if(a===Eg){for(O=0,w=c;w<d;++w)O<m[w]&&(O=m[w]);for(w=c;w<d;++w)m[w]=O+b}else for(a=!1,S=1;S<f;++S)for(w=S*c,k=w+c;w<k;++w)m[w]+=y[S-1];for(M=0,w=0;w<d;++w)M=h[w]+(w%c?M:0),v[w]+=M-t[w].x;for($=0;$<c;++$)for(T=0,w=$;w<d;w+=c)T+=m[w],x[w]+=T-t[w].y;if(o&&xt(n.center,Oo)&&f>1)for(w=0;w<d;++w)E=o===Eg?g:p[w%c],M=E-_[w].x2-t[w].x-v[w],M>0&&(v[w]+=M/2);if(a&&xt(n.center,Ro)&&c!==1)for(w=0;w<d;++w)E=a===Eg?b:y[~~(w/c)],T=E-_[w].y2-t[w].y-x[w],T>0&&(x[w]+=T/2);for(w=0;w<d;++w)s.union(_[w].translate(v[w],x[w]));switch(M=xt(n.anchor,fK),T=xt(n.anchor,dK),xt(n.anchor,Oo)){case Tn:M-=s.width();break;case z3:M-=s.width()/2}switch(xt(n.anchor,Ro)){case Tn:T-=s.height();break;case z3:T-=s.height()/2}for(M=Math.round(M),T=Math.round(T),s.clear(),w=0;w<d;++w)t[w].mark.bounds.clear();for(w=0;w<d;++w)A=t[w],A.x+=v[w]+=M,A.y+=x[w]+=T,s.union(A.mark.bounds.union(A.bounds.translate(v[w],x[w]))),i&&e.dirty(A);return s}function AK(e,t,n){var i=EK(t),r=i.marks,s=n.bounds===W3?TK:MK,o=n.offset,a=n.columns||r.length,l=a<=0?1:Math.ceil(r.length/a),u=l*a,c,f,d,h,p,g,m;const y=UC(e,r,n);y.empty()&&y.set(0,0,0,0),i.rowheaders&&(g=xt(n.headerBand,Ro,null),c=Ag(e,i.rowheaders,r,a,l,-xt(o,"rowHeader"),PC,0,s,"x1",0,a,1,g)),i.colheaders&&(g=xt(n.headerBand,Oo,null),f=Ag(e,i.colheaders,r,a,a,-xt(o,"columnHeader"),PC,1,s,"y1",0,1,a,g)),i.rowfooters&&(g=xt(n.footerBand,Ro,null),d=Ag(e,i.rowfooters,r,a,l,xt(o,"rowFooter"),BC,0,s,"x2",a-1,a,1,g)),i.colfooters&&(g=xt(n.footerBand,Oo,null),h=Ag(e,i.colfooters,r,a,a,xt(o,"columnFooter"),BC,1,s,"y2",u-a,1,a,g)),i.rowtitle&&(p=xt(n.titleAnchor,Ro),m=xt(o,"rowTitle"),m=p===Tn?d+m:c-m,g=xt(n.titleBand,Ro,.5),qC(e,i.rowtitle,m,0,y,g)),i.coltitle&&(p=xt(n.titleAnchor,Oo),m=xt(o,"columnTitle"),m=p===Tn?h+m:f-m,g=xt(n.titleBand,Oo,.5),qC(e,i.coltitle,m,1,y,g))}function TK(e,t){return t==="x1"?e.x||0:t==="y1"?e.y||0:t==="x2"?(e.x||0)+(e.width||0):t==="y2"?(e.y||0)+(e.height||0):void 0}function MK(e,t){return e.bounds[t]}function Ag(e,t,n,i,r,s,o,a,l,u,c,f,d,h){var p=n.length,g=0,m=0,y,b,v,x,_,k,w,$,S;if(!p)return g;for(y=c;y<p;y+=f)n[y]&&(g=o(g,l(n[y],u)));if(!t.length)return g;for(t.length>r&&(e.warn("Grid headers exceed limit: "+r),t=t.slice(0,r)),g+=s,b=0,x=t.length;b<x;++b)e.dirty(t[b]),t[b].mark.bounds.clear();for(y=c,b=0,x=t.length;b<x;++b,y+=f){for(k=t[b],_=k.mark.bounds,v=y;v>=0&&(w=n[v])==null;v-=d);a?($=h==null?w.x:Math.round(w.bounds.x1+h*w.bounds.width()),S=g):($=g,S=h==null?w.y:Math.round(w.bounds.y1+h*w.bounds.height())),_.union(k.bounds.translate($-(k.x||0),S-(k.y||0))),k.x=$,k.y=S,e.dirty(k),m=o(m,_[u])}return m}function qC(e,t,n,i,r,s){if(t){e.dirty(t);var o=n,a=n;i?o=Math.round(r.x1+s*r.width()):a=Math.round(r.y1+s*r.height()),t.bounds.translate(o-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=a,e.dirty(t)}}function FK(e,t){const n=e[t]||{};return(i,r)=>n[i]!=null?n[i]:e[i]!=null?e[i]:r}function DK(e,t){let n=-1/0;return e.forEach(i=>{i.offset!=null&&(n=Math.max(n,i.offset))}),n>-1/0?n:t}function NK(e,t,n,i,r,s,o){const a=FK(n,t),l=DK(e,a("offset",0)),u=a("anchor",I3),c=u===Tn?1:u===z3?.5:0,f={align:q3,bounds:a("bounds",W3),columns:a("direction")==="vertical"?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case rr:f.anchor={x:Math.floor(i.x1)-l,column:Tn,y:c*(o||i.height()+2*i.y1),row:u};break;case sr:f.anchor={x:Math.ceil(i.x2)+l,y:c*(o||i.height()+2*i.y1),row:u};break;case $u:f.anchor={y:Math.floor(r.y1)-l,row:Tn,x:c*(s||r.width()+2*r.x1),column:u};break;case No:f.anchor={y:Math.ceil(r.y2)+l,x:c*(s||r.width()+2*r.x1),column:u};break;case aK:f.anchor={x:l,y:l};break;case lK:f.anchor={x:s-l,y:l,column:Tn};break;case uK:f.anchor={x:l,y:o-l,row:Tn};break;case cK:f.anchor={x:s-l,y:o-l,column:Tn,row:Tn};break}return f}function OK(e,t){var n=t.items[0],i=n.datum,r=n.orient,s=n.bounds,o=n.x,a=n.y,l,u;return n._bounds?n._bounds.clear().union(s):n._bounds=s.clone(),s.clear(),LK(e,n,n.items[0].items[0]),s=RK(n,s),l=2*n.padding,u=2*n.padding,s.empty()||(l=Math.ceil(s.width()+l),u=Math.ceil(s.height()+u)),i.type===mK&&IK(n.items[0].items[0].items[0].items),r!==U3&&(n.x=o=0,n.y=a=0),n.width=l,n.height=u,As(s.set(o,a,o+l,a+u),n),n.mark.bounds.clear().union(s),n}function RK(e,t){return e.items.forEach(n=>t.union(n.bounds)),t.x1=e.padding,t.y1=e.padding,t}function LK(e,t,n){var i=t.padding,r=i-n.x,s=i-n.y;if(!t.datum.title)(r||s)&&If(e,n,r,s);else{var o=t.items[1].items[0],a=o.anchor,l=t.titlePadding||0,u=i-o.x,c=i-o.y;switch(o.orient){case rr:r+=Math.ceil(o.bounds.width())+l;break;case sr:case No:break;default:s+=o.bounds.height()+l}switch((r||s)&&If(e,n,r,s),o.orient){case rr:c+=Cu(t,n,o,a,1,1);break;case sr:u+=Cu(t,n,o,Tn,0,0)+l,c+=Cu(t,n,o,a,1,1);break;case No:u+=Cu(t,n,o,a,0,0),c+=Cu(t,n,o,Tn,-1,0,1)+l;break;default:u+=Cu(t,n,o,a,0,0)}(u||c)&&If(e,o,u,c),(u=Math.round(o.bounds.x1-i))<0&&(If(e,n,-u,0),If(e,o,-u,0))}}function Cu(e,t,n,i,r,s,o){const a=e.datum.type!=="symbol",l=n.datum.vgrad,u=a&&(s||!l)&&!o?t.items[0]:t,c=u.bounds[r?"y2":"x2"]-e.padding,f=l&&s?c:0,d=l&&s?0:c,h=r<=0?0:p3(n);return Math.round(i===I3?f:i===Tn?d-h:.5*(c-h))}function If(e,t,n,i){t.x+=n,t.y+=i,t.bounds.translate(n,i),t.mark.bounds.translate(n,i),e.dirty(t)}function IK(e){const t=e.reduce((n,i)=>(n[i.column]=Math.max(i.bounds.x2-i.x,n[i.column]||0),n),{});e.forEach(n=>{n.width=t[n.column],n.height=n.bounds.y2-n.y})}function zK(e,t,n,i,r){var s=t.items[0],o=s.frame,a=s.orient,l=s.anchor,u=s.offset,c=s.padding,f=s.items[0].items[0],d=s.items[1]&&s.items[1].items[0],h=a===rr||a===sr?i:n,p=0,g=0,m=0,y=0,b=0,v;if(o!==$g?a===rr?(p=r.y2,h=r.y1):a===sr?(p=r.y1,h=r.y2):(p=r.x1,h=r.x2):a===rr&&(p=i,h=0),v=l===I3?p:l===Tn?h:(p+h)/2,d&&d.text){switch(a){case $u:case No:b=f.bounds.height()+c;break;case rr:y=f.bounds.width()+c;break;case sr:y=-f.bounds.width()-c;break}xn.clear().union(d.bounds),xn.translate(y-(d.x||0),b-(d.y||0)),Eu(d,"x",y)|Eu(d,"y",b)&&(e.dirty(d),d.bounds.clear().union(xn),d.mark.bounds.clear().union(xn),e.dirty(d)),xn.clear().union(d.bounds)}else xn.clear();switch(xn.union(f.bounds),a){case $u:g=v,m=r.y1-xn.height()-u;break;case rr:g=r.x1-xn.width()-u,m=v;break;case sr:g=r.x2+xn.width()+u,m=v;break;case No:g=v,m=r.y2+u;break;default:g=s.x,m=s.y}return Eu(s,"x",g)|Eu(s,"y",m)&&(xn.translate(g,m),e.dirty(s),s.bounds.clear().union(xn),t.bounds.clear().union(xn),e.dirty(s)),s.bounds}function WC(e){I.call(this,null,e)}K(WC,I,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach(i=>{e.layout&&AK(n,i,e.layout),BK(n,i,e)}),PK(e.mark.group)?t.reflow():t}});function PK(e){return e&&e.mark.role!=="legend-entry"}function BK(e,t,n){var i=t.items,r=Math.max(0,t.width||0),s=Math.max(0,t.height||0),o=new Ot().set(0,0,r,s),a=o.clone(),l=o.clone(),u=[],c,f,d,h,p,g;for(p=0,g=i.length;p<g;++p)switch(f=i[p],f.role){case P3:h=wK(f)?a:l,h.union($K(e,f,r,s));break;case B3:c=f;break;case j3:u.push(OK(e,f));break;case hK:case pK:case xC:case _C:case wC:case kC:case $C:case EC:a.union(f.bounds),l.union(f.bounds);break;default:o.union(f.bounds)}if(u.length){const m={};u.forEach(y=>{d=y.orient||sr,d!==U3&&(m[d]||(m[d]=[])).push(y)});for(const y in m){const b=m[y];UC(e,b,NK(b,y,n.legends,a,l,r,s))}u.forEach(y=>{const b=y.bounds;if(b.equals(y._bounds)||(y.bounds=y._bounds,e.dirty(y),y.bounds=b,e.dirty(y)),n.autosize&&(n.autosize.type===CC||n.autosize.type===SC||n.autosize.type===AC))switch(y.orient){case rr:case sr:o.add(b.x1,0).add(b.x2,0);break;case $u:case No:o.add(0,b.y1).add(0,b.y2)}else o.union(b)})}o.union(a).union(l),c&&o.union(zK(e,c,r,s,o)),t.clip&&o.set(0,0,t.width||0,t.height||0),jK(e,t,o,n)}function jK(e,t,n,i){const r=i.autosize||{},s=r.type;if(e._autosize<1||!s)return;let o=e._width,a=e._height,l=Math.max(0,t.width||0),u=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,t.height||0),f=Math.max(0,Math.ceil(-n.y1));const d=Math.max(0,Math.ceil(n.x2-l)),h=Math.max(0,Math.ceil(n.y2-c));if(r.contains===gK){const p=e.padding();o-=p.left+p.right,a-=p.top+p.bottom}s===U3?(u=0,f=0,l=o,c=a):s===CC?(l=Math.max(0,o-u-d),c=Math.max(0,a-f-h)):s===SC?(l=Math.max(0,o-u-d),a=c+f+h):s===AC?(o=l+u+d,c=Math.max(0,a-f-h)):s===yK&&(o=l+u+d,a=c+f+h),e._resizeView(o,a,l,c,[u,f],r.resize)}const UK=Object.freeze(Object.defineProperty({__proto__:null,bound:TC,identifier:H3,mark:FC,overlap:DC,render:zC,viewlayout:WC},Symbol.toStringTag,{value:"Module"}));function HC(e){I.call(this,null,e)}K(HC,I,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,s=e.scale,o=e.count==null?e.values?e.values.length:10:e.count,a=Pb(s,o,e.minstep),l=e.format||B$(n,s,a,e.formatSpecifier,e.formatType,!!e.values),u=e.values?P$(s,e.values,a):Bb(s,a);return r&&(i.rem=r),r=u.map((c,f)=>et({index:f/(u.length-1||1),value:c,label:l(c)})),e.extra&&r.length&&r.push(et({index:-1,extra:{value:r[0].value},label:""})),i.source=r,i.add=r,this.value=r,i}});function GC(e){I.call(this,null,e)}function qK(){return et({})}function WK(e){const t=Gl().test(n=>n.exit);return t.lookup=n=>t.get(e(n)),t}K(GC,I,{transform(e,t){var n=t.dataflow,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.item||qK,s=e.key||ge,o=this.value;return q(i.encode)&&(i.encode=null),o&&(e.modified("key")||t.modified(s))&&U("DataJoin does not support modified key function or fields."),o||(t=t.addAll(),this.value=o=WK(s)),t.visit(t.ADD,a=>{const l=s(a);let u=o.get(l);u?u.exit?(o.empty--,i.add.push(u)):i.mod.push(u):(u=r(a),o.set(l,u),i.add.push(u)),u.datum=a,u.exit=!1}),t.visit(t.MOD,a=>{const l=s(a),u=o.get(l);u&&(u.datum=a,i.mod.push(u))}),t.visit(t.REM,a=>{const l=s(a),u=o.get(l);a===u.datum&&!u.exit&&(i.rem.push(u),u.exit=!0,++o.empty)}),t.changed(t.ADD_MOD)&&i.modifies("datum"),(t.clean()||e.clean&&o.empty>n.cleanThreshold)&&n.runAfter(o.clean),i}});function VC(e){I.call(this,null,e)}K(VC,I,{transform(e,t){var n=t.fork(t.ADD_REM),i=e.mod||!1,r=e.encoders,s=t.encode;if(q(s))if(n.changed()||s.every(f=>r[f]))s=s[0],n.encode=null;else return t.StopPropagation;var o=s==="enter",a=r.update||ro,l=r.enter||ro,u=r.exit||ro,c=(s&&!o?r[s]:a)||ro;if(t.changed(t.ADD)&&(t.visit(t.ADD,f=>{l(f,e),a(f,e)}),n.modifies(l.output),n.modifies(a.output),c!==ro&&c!==a&&(t.visit(t.ADD,f=>{c(f,e)}),n.modifies(c.output))),t.changed(t.REM)&&u!==ro&&(t.visit(t.REM,f=>{u(f,e)}),n.modifies(u.output)),o||c!==ro){const f=t.MOD|(e.modified()?t.REFLOW:0);o?(t.visit(f,d=>{const h=l(d,e)||i;(c(d,e)||h)&&n.mod.push(d)}),n.mod.length&&n.modifies(l.output)):t.visit(f,d=>{(c(d,e)||i)&&n.mod.push(d)}),n.mod.length&&n.modifies(c.output)}return n.changed()?n:t.StopPropagation}});function XC(e){I.call(this,[],e)}K(XC,I,{transform(e,t){if(this.value!=null&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),i=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=this.value,s=e.type||Hp,o=e.scale,a=+e.limit,l=Pb(o,e.count==null?5:e.count,e.minstep),u=!!e.values||s===Hp,c=e.format||W$(n,o,l,s,e.formatSpecifier,e.formatType,u),f=e.values||q$(o,l),d,h,p,g,m;return r&&(i.rem=r),s===Hp?(a&&f.length>a?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),r=f.slice(0,a-1),m=!0):r=f,Me(p=e.size)?(!e.values&&o(r[0])===0&&(r=r.slice(1)),g=r.reduce((y,b)=>Math.max(y,p(b,e)),0)):p=pn(g=p||8),r=r.map((y,b)=>et({index:b,label:c(y,b,r),value:y,offset:g,size:p(y,e)})),m&&(m=f[r.length],r.push(et({index:r.length,label:`…${f.length-r.length} entries`,value:m,offset:g,size:p(m,e)})))):s===mX?(d=o.domain(),h=R$(o,d[0],Ue(d)),f.length<3&&!e.values&&d[0]!==Ue(d)&&(f=[d[0],Ue(d)]),r=f.map((y,b)=>et({index:b,label:c(y,b,f),value:y,perc:h(y)}))):(p=f.length-1,h=SX(o),r=f.map((y,b)=>et({index:b,label:c(y,b,f),value:y,perc:b?h(y):0,perc2:b===p?1:h(f[b+1])}))),i.source=r,i.add=r,this.value=r,i}});const HK=e=>e.source.x,GK=e=>e.source.y,VK=e=>e.target.x,XK=e=>e.target.y;function G3(e){I.call(this,{},e)}G3.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},K(G3,I,{transform(e,t){var n=e.sourceX||HK,i=e.sourceY||GK,r=e.targetX||VK,s=e.targetY||XK,o=e.as||"path",a=e.orient||"vertical",l=e.shape||"line",u=JC.get(l+"-"+a)||JC.get(l);return u||U("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,c=>{c[o]=u(n(c),i(c),r(c),s(c))}),t.reflow(e.modified()).modifies(o)}});const YC=(e,t,n,i)=>"M"+e+","+t+"L"+n+","+i,YK=(e,t,n,i)=>YC(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),ZC=(e,t,n,i)=>{var r=n-e,s=i-t,o=Math.hypot(r,s)/2,a=180*Math.atan2(s,r)/Math.PI;return"M"+e+","+t+"A"+o+","+o+" "+a+" 0 1 "+n+","+i},ZK=(e,t,n,i)=>ZC(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),KC=(e,t,n,i)=>{const r=n-e,s=i-t,o=.2*(r+s),a=.2*(s-r);return"M"+e+","+t+"C"+(e+o)+","+(t+a)+" "+(n+a)+","+(i-o)+" "+n+","+i},JC=Gl({line:YC,"line-radial":YK,arc:ZC,"arc-radial":ZK,curve:KC,"curve-radial":(e,t,n,i)=>KC(t*Math.cos(e),t*Math.sin(e),i*Math.cos(n),i*Math.sin(n)),"orthogonal-horizontal":(e,t,n,i)=>"M"+e+","+t+"V"+i+"H"+n,"orthogonal-vertical":(e,t,n,i)=>"M"+e+","+t+"H"+n+"V"+i,"orthogonal-radial":(e,t,n,i)=>{const r=Math.cos(e),s=Math.sin(e),o=Math.cos(n),a=Math.sin(n),l=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*r+","+t*s+"A"+t+","+t+" 0 0,"+(l?1:0)+" "+t*o+","+t*a+"L"+i*o+","+i*a},"diagonal-horizontal":(e,t,n,i)=>{const r=(e+n)/2;return"M"+e+","+t+"C"+r+","+t+" "+r+","+i+" "+n+","+i},"diagonal-vertical":(e,t,n,i)=>{const r=(t+i)/2;return"M"+e+","+t+"C"+e+","+r+" "+n+","+r+" "+n+","+i},"diagonal-radial":(e,t,n,i)=>{const r=Math.cos(e),s=Math.sin(e),o=Math.cos(n),a=Math.sin(n),l=(t+i)/2;return"M"+t*r+","+t*s+"C"+l*r+","+l*s+" "+l*o+","+l*a+" "+i*o+","+i*a}});function V3(e){I.call(this,null,e)}V3.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},K(V3,I,{transform(e,t){var n=e.as||["startAngle","endAngle"],i=n[0],r=n[1],s=e.field||ql,o=e.startAngle||0,a=e.endAngle!=null?e.endAngle:2*Math.PI,l=t.source,u=l.map(s),c=u.length,f=o,d=(a-o)/T4(u),h=hi(c),p,g,m;for(e.sort&&h.sort((y,b)=>u[y]-u[b]),p=0;p<c;++p)m=u[h[p]],g=l[h[p]],g[i]=f,g[r]=f+=m*d;return this.value=u,t.reflow(e.modified()).modifies(n)}});const KK=5;function JK(e){const t=e.type;return!e.bins&&(t===pu||t===gf||t===mf)}function QC(e){return Rb(e)&&e!==Wr}const QK=Ki(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function eS(e){I.call(this,null,e),this.modified(!0)}K(eS,I,{transform(e,t){var n=t.dataflow,i=this.value,r=eJ(e);(!i||r!==i.type)&&(this.value=i=Ke(r)());for(r in e)if(!QK[r]){if(r==="padding"&&QC(i.type))continue;Me(i[r])?i[r](e[r]):n.warn("Unsupported scale property: "+r)}return oJ(i,e,sJ(i,e,nJ(i,e,n))),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function eJ(e){var t=e.type,n="",i;return t===Wr?Wr+"-"+pu:(tJ(e)&&(i=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=i===2?Wr+"-":i===3?gu+"-":""),(n+t||pu).toLowerCase())}function tJ(e){const t=e.type;return Rb(t)&&t!==Ma&&t!==Fa&&(e.scheme||e.range&&e.range.length&&e.range.every(te))}function nJ(e,t,n){const i=iJ(e,t.domainRaw,n);if(i>-1)return i;var r=t.domain,s=e.type,o=t.zero||t.zero===void 0&&JK(e),a,l;if(!r)return 0;if(QC(s)&&t.padding&&r[0]!==Ue(r)&&(r=rJ(s,r,t.range,t.padding,t.exponent,t.constant)),(o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(a=(r=r.slice()).length-1||1,o&&(r[0]>0&&(r[0]=0),r[a]<0&&(r[a]=0)),t.domainMin!=null&&(r[0]=t.domainMin),t.domainMax!=null&&(r[a]=t.domainMax),t.domainMid!=null)){l=t.domainMid;const u=l>r[a]?a+1:l<r[0]?0:a;u!==a&&n.warn("Scale domainMid exceeds domain min or max.",l),r.splice(u,0,l)}return e.domain(tS(s,r,n)),s===Mb&&e.unknown(t.domainImplicit?nb:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&Pb(e,t.nice)||null),r.length}function iJ(e,t,n){return t?(e.domain(tS(e.type,t,n)),t.length):-1}function rJ(e,t,n,i,r,s){var o=Math.abs(Ue(n)-n[0]),a=o/(o-2*i),l=e===Cs?l2(t,null,a):e===mf?Rh(t,null,a,.5):e===gf?Rh(t,null,a,r||1):e===Bp?u2(t,null,a,s||1):a2(t,null,a);return t=t.slice(),t[0]=l[0],t[t.length-1]=l[1],t}function tS(e,t,n){if(M$(e)){var i=Math.abs(t.reduce((r,s)=>r+(s<0?-1:s>0?1:0),0));i!==t.length&&n.warn("Log scale domain includes zero: "+J(t))}return t}function sJ(e,t,n){let i=t.bins;if(i&&!q(i)){const r=e.domain(),s=r[0],o=Ue(r),a=i.step;let l=i.start==null?s:i.start,u=i.stop==null?o:i.stop;a||U("Scale bins parameter missing step property."),l<s&&(l=a*Math.ceil(s/a)),u>o&&(u=a*Math.floor(o/a)),i=hi(l,u+a/2,a)}return i?e.bins=i:e.bins&&delete e.bins,e.type===Db&&(i?!t.domain&&!t.domainRaw&&(e.domain(i),n=i.length):e.bins=e.domain()),n}function oJ(e,t,n){var i=e.type,r=t.round||!1,s=t.range;if(t.rangeStep!=null)s=aJ(i,t,n);else if(t.scheme&&(s=lJ(i,t,n),Me(s))){if(e.interpolator)return e.interpolator(s);U(`Scale type ${i} does not support interpolating color schemes.`)}if(s&&F$(i))return e.interpolator(Wp(X3(s,t.reverse),t.interpolate,t.interpolateGamma));s&&t.interpolate&&e.interpolate?e.interpolate(Ib(t.interpolate,t.interpolateGamma)):Me(e.round)?e.round(r):Me(e.rangeRound)&&e.interpolate(r?hf:xo),s&&e.range(X3(s,t.reverse))}function aJ(e,t,n){e!==$$&&e!==Fb&&U("Only band and point scales support rangeStep.");var i=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,r=e===Fb?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Tb(n,r,i)]}function lJ(e,t,n){var i=t.schemeExtent,r,s;return q(t.scheme)?s=Wp(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),s=zb(r),s||U(`Unrecognized scheme name: ${t.scheme}`)),n=e===Up?n+1:e===Db?n-1:e===mu||e===jp?+t.schemeCount||KK:n,F$(e)?nS(s,i,t.reverse):Me(s)?O$(nS(s,i),n):e===Mb?s:s.slice(0,n)}function nS(e,t,n){return Me(e)&&(t||n)?N$(e,X3(t||[0,1],n)):e}function X3(e,t){return t?e.slice().reverse():e}function iS(e){I.call(this,null,e)}K(iS,I,{transform(e,t){const n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(xa(e.sort)),this.modified(n),t}});const rS="zero",sS="center",oS="normalize",aS=["y0","y1"];function Y3(e){I.call(this,null,e)}Y3.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:rS,values:[rS,sS,oS]},{name:"as",type:"string",array:!0,length:2,default:aS}]},K(Y3,I,{transform(e,t){var n=e.as||aS,i=n[0],r=n[1],s=xa(e.sort),o=e.field||ql,a=e.offset===sS?uJ:e.offset===oS?cJ:fJ,l,u,c,f;for(l=dJ(t.source,e.groupby,s,o),u=0,c=l.length,f=l.max;u<c;++u)a(l[u],f,o,i,r);return t.reflow(e.modified()).modifies(n)}});function uJ(e,t,n,i,r){for(var s=(t-e.sum)/2,o=e.length,a=0,l;a<o;++a)l=e[a],l[i]=s,l[r]=s+=Math.abs(n(l))}function cJ(e,t,n,i,r){for(var s=1/e.sum,o=0,a=e.length,l=0,u=0,c;l<a;++l)c=e[l],c[i]=o,c[r]=o=s*(u+=Math.abs(n(c)))}function fJ(e,t,n,i,r){for(var s=0,o=0,a=e.length,l=0,u,c;l<a;++l)c=e[l],u=+n(c),u<0?(c[i]=o,c[r]=o+=u):(c[i]=s,c[r]=s+=u)}function dJ(e,t,n,i){var r=[],s=g=>g(c),o,a,l,u,c,f,d,h,p;if(t==null)r.push(e.slice());else for(o={},a=0,l=e.length;a<l;++a)c=e[a],f=t.map(s),d=o[f],d||(o[f]=d=[],r.push(d)),d.push(c);for(f=0,p=0,u=r.length;f<u;++f){for(d=r[f],a=0,h=0,l=d.length;a<l;++a)h+=Math.abs(i(d[a]));d.sum=h,h>p&&(p=h),n&&d.sort(n)}return r.max=p,r}const hJ=Object.freeze(Object.defineProperty({__proto__:null,axisticks:HC,datajoin:GC,encode:VC,legendentries:XC,linkpath:G3,pie:V3,scale:eS,sortitems:iS,stack:Y3},Symbol.toStringTag,{value:"Module"}));var _e=1e-6,Tg=1e-12,Re=Math.PI,Ct=Re/2,Mg=Re/4,Mn=Re*2,Mt=180/Re,Ne=Re/180,qe=Math.abs,Su=Math.atan,Li=Math.atan2,we=Math.cos,Fg=Math.ceil,lS=Math.exp,Z3=Math.hypot,Dg=Math.log,K3=Math.pow,me=Math.sin,Ii=Math.sign||function(e){return e>0?1:e<0?-1:0},Fn=Math.sqrt,J3=Math.tan;function uS(e){return e>1?0:e<-1?Re:Math.acos(e)}function Qn(e){return e>1?Ct:e<-1?-Ct:Math.asin(e)}function sn(){}function Ng(e,t){e&&fS.hasOwnProperty(e.type)&&fS[e.type](e,t)}var cS={Feature:function(e,t){Ng(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)Ng(n[i].geometry,t)}},fS={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){Q3(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Q3(n[i],t,0)},Polygon:function(e,t){dS(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)dS(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)Ng(n[i],t)}};function Q3(e,t,n){var i=-1,r=e.length-n,s;for(t.lineStart();++i<r;)s=e[i],t.point(s[0],s[1],s[2]);t.lineEnd()}function dS(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)Q3(e[n],t,1);t.polygonEnd()}function Ms(e,t){e&&cS.hasOwnProperty(e.type)?cS[e.type](e,t):Ng(e,t)}var Og=new Sn,Rg=new Sn,hS,pS,ev,tv,nv,Xr={point:sn,lineStart:sn,lineEnd:sn,polygonStart:function(){Og=new Sn,Xr.lineStart=pJ,Xr.lineEnd=gJ},polygonEnd:function(){var e=+Og;Rg.add(e<0?Mn+e:e),this.lineStart=this.lineEnd=this.point=sn},sphere:function(){Rg.add(Mn)}};function pJ(){Xr.point=mJ}function gJ(){gS(hS,pS)}function mJ(e,t){Xr.point=gS,hS=e,pS=t,e*=Ne,t*=Ne,ev=e,tv=we(t=t/2+Mg),nv=me(t)}function gS(e,t){e*=Ne,t*=Ne,t=t/2+Mg;var n=e-ev,i=n>=0?1:-1,r=i*n,s=we(t),o=me(t),a=nv*o,l=tv*s+a*we(r),u=a*i*me(r);Og.add(Li(u,l)),ev=e,tv=s,nv=o}function yJ(e){return Rg=new Sn,Ms(e,Xr),Rg*2}function Lg(e){return[Li(e[1],e[0]),Qn(e[2])]}function Pa(e){var t=e[0],n=e[1],i=we(n);return[i*we(t),i*me(t),me(n)]}function Ig(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Au(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function iv(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function zg(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Pg(e){var t=Fn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var kt,ei,St,vi,Ba,mS,yS,Tu,zf,Lo,Fs,Ds={point:rv,lineStart:vS,lineEnd:xS,polygonStart:function(){Ds.point=_S,Ds.lineStart=bJ,Ds.lineEnd=vJ,zf=new Sn,Xr.polygonStart()},polygonEnd:function(){Xr.polygonEnd(),Ds.point=rv,Ds.lineStart=vS,Ds.lineEnd=xS,Og<0?(kt=-(St=180),ei=-(vi=90)):zf>_e?vi=90:zf<-_e&&(ei=-90),Fs[0]=kt,Fs[1]=St},sphere:function(){kt=-(St=180),ei=-(vi=90)}};function rv(e,t){Lo.push(Fs=[kt=e,St=e]),t<ei&&(ei=t),t>vi&&(vi=t)}function bS(e,t){var n=Pa([e*Ne,t*Ne]);if(Tu){var i=Au(Tu,n),r=[i[1],-i[0],0],s=Au(r,i);Pg(s),s=Lg(s);var o=e-Ba,a=o>0?1:-1,l=s[0]*Mt*a,u,c=qe(o)>180;c^(a*Ba<l&&l<a*e)?(u=s[1]*Mt,u>vi&&(vi=u)):(l=(l+360)%360-180,c^(a*Ba<l&&l<a*e)?(u=-s[1]*Mt,u<ei&&(ei=u)):(t<ei&&(ei=t),t>vi&&(vi=t))),c?e<Ba?xi(kt,e)>xi(kt,St)&&(St=e):xi(e,St)>xi(kt,St)&&(kt=e):St>=kt?(e<kt&&(kt=e),e>St&&(St=e)):e>Ba?xi(kt,e)>xi(kt,St)&&(St=e):xi(e,St)>xi(kt,St)&&(kt=e)}else Lo.push(Fs=[kt=e,St=e]);t<ei&&(ei=t),t>vi&&(vi=t),Tu=n,Ba=e}function vS(){Ds.point=bS}function xS(){Fs[0]=kt,Fs[1]=St,Ds.point=rv,Tu=null}function _S(e,t){if(Tu){var n=e-Ba;zf.add(qe(n)>180?n+(n>0?360:-360):n)}else mS=e,yS=t;Xr.point(e,t),bS(e,t)}function bJ(){Xr.lineStart()}function vJ(){_S(mS,yS),Xr.lineEnd(),qe(zf)>_e&&(kt=-(St=180)),Fs[0]=kt,Fs[1]=St,Tu=null}function xi(e,t){return(t-=e)<0?t+360:t}function xJ(e,t){return e[0]-t[0]}function wS(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function _J(e){var t,n,i,r,s,o,a;if(vi=St=-(kt=ei=1/0),Lo=[],Ms(e,Ds),n=Lo.length){for(Lo.sort(xJ),t=1,i=Lo[0],s=[i];t<n;++t)r=Lo[t],wS(i,r[0])||wS(i,r[1])?(xi(i[0],r[1])>xi(i[0],i[1])&&(i[1]=r[1]),xi(r[0],i[1])>xi(i[0],i[1])&&(i[0]=r[0])):s.push(i=r);for(o=-1/0,n=s.length-1,t=0,i=s[n];t<=n;i=r,++t)r=s[t],(a=xi(i[1],r[0]))>o&&(o=a,kt=r[0],St=i[1])}return Lo=Fs=null,kt===1/0||ei===1/0?[[NaN,NaN],[NaN,NaN]]:[[kt,ei],[St,vi]]}var Pf,Bg,jg,Ug,qg,Wg,Hg,Gg,sv,ov,av,kS,$S,Dn,Nn,On,or={sphere:sn,point:lv,lineStart:ES,lineEnd:CS,polygonStart:function(){or.lineStart=$J,or.lineEnd=EJ},polygonEnd:function(){or.lineStart=ES,or.lineEnd=CS}};function lv(e,t){e*=Ne,t*=Ne;var n=we(t);Bf(n*we(e),n*me(e),me(t))}function Bf(e,t,n){++Pf,jg+=(e-jg)/Pf,Ug+=(t-Ug)/Pf,qg+=(n-qg)/Pf}function ES(){or.point=wJ}function wJ(e,t){e*=Ne,t*=Ne;var n=we(t);Dn=n*we(e),Nn=n*me(e),On=me(t),or.point=kJ,Bf(Dn,Nn,On)}function kJ(e,t){e*=Ne,t*=Ne;var n=we(t),i=n*we(e),r=n*me(e),s=me(t),o=Li(Fn((o=Nn*s-On*r)*o+(o=On*i-Dn*s)*o+(o=Dn*r-Nn*i)*o),Dn*i+Nn*r+On*s);Bg+=o,Wg+=o*(Dn+(Dn=i)),Hg+=o*(Nn+(Nn=r)),Gg+=o*(On+(On=s)),Bf(Dn,Nn,On)}function CS(){or.point=lv}function $J(){or.point=CJ}function EJ(){SS(kS,$S),or.point=lv}function CJ(e,t){kS=e,$S=t,e*=Ne,t*=Ne,or.point=SS;var n=we(t);Dn=n*we(e),Nn=n*me(e),On=me(t),Bf(Dn,Nn,On)}function SS(e,t){e*=Ne,t*=Ne;var n=we(t),i=n*we(e),r=n*me(e),s=me(t),o=Nn*s-On*r,a=On*i-Dn*s,l=Dn*r-Nn*i,u=Z3(o,a,l),c=Qn(u),f=u&&-c/u;sv.add(f*o),ov.add(f*a),av.add(f*l),Bg+=c,Wg+=c*(Dn+(Dn=i)),Hg+=c*(Nn+(Nn=r)),Gg+=c*(On+(On=s)),Bf(Dn,Nn,On)}function SJ(e){Pf=Bg=jg=Ug=qg=Wg=Hg=Gg=0,sv=new Sn,ov=new Sn,av=new Sn,Ms(e,or);var t=+sv,n=+ov,i=+av,r=Z3(t,n,i);return r<Tg&&(t=Wg,n=Hg,i=Gg,Bg<_e&&(t=jg,n=Ug,i=qg),r=Z3(t,n,i),r<Tg)?[NaN,NaN]:[Li(n,t)*Mt,Qn(i/r)*Mt]}function uv(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return i=t.invert(i,r),i&&e.invert(i[0],i[1])}),n}function cv(e,t){return qe(e)>Re&&(e-=Math.round(e/Mn)*Mn),[e,t]}cv.invert=cv;function AS(e,t,n){return(e%=Mn)?t||n?uv(MS(e),FS(t,n)):MS(e):t||n?FS(t,n):cv}function TS(e){return function(t,n){return t+=e,qe(t)>Re&&(t-=Math.round(t/Mn)*Mn),[t,n]}}function MS(e){var t=TS(e);return t.invert=TS(-e),t}function FS(e,t){var n=we(e),i=me(e),r=we(t),s=me(t);function o(a,l){var u=we(l),c=we(a)*u,f=me(a)*u,d=me(l),h=d*n+c*i;return[Li(f*r-h*s,c*n-d*i),Qn(h*r+f*s)]}return o.invert=function(a,l){var u=we(l),c=we(a)*u,f=me(a)*u,d=me(l),h=d*r-f*s;return[Li(f*r+d*s,c*n+h*i),Qn(h*n-c*i)]},o}function AJ(e){e=AS(e[0]*Ne,e[1]*Ne,e.length>2?e[2]*Ne:0);function t(n){return n=e(n[0]*Ne,n[1]*Ne),n[0]*=Mt,n[1]*=Mt,n}return t.invert=function(n){return n=e.invert(n[0]*Ne,n[1]*Ne),n[0]*=Mt,n[1]*=Mt,n},t}function TJ(e,t,n,i,r,s){if(n){var o=we(t),a=me(t),l=i*n;r==null?(r=t+i*Mn,s=t-l/2):(r=DS(o,r),s=DS(o,s),(i>0?r<s:r>s)&&(r+=i*Mn));for(var u,c=r;i>0?c>s:c<s;c-=l)u=Lg([o,-a*we(c),-a*me(c)]),e.point(u[0],u[1])}}function DS(e,t){t=Pa(t),t[0]-=e,Pg(t);var n=uS(-t[1]);return((-t[2]<0?-n:n)+Mn-_e)%Mn}function NS(){var e=[],t;return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:sn,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Vg(e,t){return qe(e[0]-t[0])<_e&&qe(e[1]-t[1])<_e}function Xg(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function OS(e,t,n,i,r){var s=[],o=[],a,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],b;if(Vg(m,y)){if(!m[2]&&!y[2]){for(r.lineStart(),a=0;a<g;++a)r.point((m=p[a])[0],m[1]);r.lineEnd();return}y[0]+=2*_e}s.push(b=new Xg(m,p,null,!0)),o.push(b.o=new Xg(m,null,b,!1)),s.push(b=new Xg(y,p,null,!1)),o.push(b.o=new Xg(y,null,b,!0))}}),!!s.length){for(o.sort(t),RS(s),RS(o),a=0,l=o.length;a<l;++a)o[a].e=n=!n;for(var u=s[0],c,f;;){for(var d=u,h=!0;d.v;)if((d=d.n)===u)return;c=d.z,r.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(a=0,l=c.length;a<l;++a)r.point((f=c[a])[0],f[1]);else i(d.x,d.n.x,1,r);d=d.n}else{if(h)for(c=d.p.z,a=c.length-1;a>=0;--a)r.point((f=c[a])[0],f[1]);else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,c=d.z,h=!h}while(!d.v);r.lineEnd()}}}function RS(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function fv(e){return qe(e[0])<=Re?e[0]:Ii(e[0])*((qe(e[0])+Re)%Mn-Re)}function MJ(e,t){var n=fv(t),i=t[1],r=me(i),s=[me(n),-we(n),0],o=0,a=0,l=new Sn;r===1?i=Ct+_e:r===-1&&(i=-Ct-_e);for(var u=0,c=e.length;u<c;++u)if(d=(f=e[u]).length)for(var f,d,h=f[d-1],p=fv(h),g=h[1]/2+Mg,m=me(g),y=we(g),b=0;b<d;++b,p=x,m=k,y=w,h=v){var v=f[b],x=fv(v),_=v[1]/2+Mg,k=me(_),w=we(_),$=x-p,S=$>=0?1:-1,E=S*$,A=E>Re,R=m*k;if(l.add(Li(R*S*me(E),y*w+R*we(E))),o+=A?$+S*Mn:$,A^p>=n^x>=n){var C=Au(Pa(h),Pa(v));Pg(C);var M=Au(s,C);Pg(M);var T=(A^$>=0?-1:1)*Qn(M[2]);(i>T||i===T&&(C[0]||C[1]))&&(a+=A^$>=0?1:-1)}}return(o<-_e||o<_e&&l<-Tg)^a&1}function LS(e,t,n,i){return function(r){var s=t(r),o=NS(),a=t(o),l=!1,u,c,f,d={point:h,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=b,d.lineEnd=v,c=[],u=[]},polygonEnd:function(){d.point=h,d.lineStart=g,d.lineEnd=m,c=A4(c);var x=MJ(u,i);c.length?(l||(r.polygonStart(),l=!0),OS(c,DJ,x,n,r)):x&&(l||(r.polygonStart(),l=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),l&&(r.polygonEnd(),l=!1),c=u=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(x,_){e(x,_)&&r.point(x,_)}function p(x,_){s.point(x,_)}function g(){d.point=p,s.lineStart()}function m(){d.point=h,s.lineEnd()}function y(x,_){f.push([x,_]),a.point(x,_)}function b(){a.lineStart(),f=[]}function v(){y(f[0][0],f[0][1]),a.lineEnd();var x=a.clean(),_=o.result(),k,w=_.length,$,S,E;if(f.pop(),u.push(f),f=null,!!w){if(x&1){if(S=_[0],($=S.length-1)>0){for(l||(r.polygonStart(),l=!0),r.lineStart(),k=0;k<$;++k)r.point((E=S[k])[0],E[1]);r.lineEnd()}return}w>1&&x&2&&_.push(_.pop().concat(_.shift())),c.push(_.filter(FJ))}}return d}}function FJ(e){return e.length>1}function DJ(e,t){return((e=e.x)[0]<0?e[1]-Ct-_e:Ct-e[1])-((t=t.x)[0]<0?t[1]-Ct-_e:Ct-t[1])}const IS=LS(function(){return!0},NJ,RJ,[-Re,-Ct]);function NJ(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(s,o){var a=s>0?Re:-Re,l=qe(s-t);qe(l-Re)<_e?(e.point(t,n=(n+o)/2>0?Ct:-Ct),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(s,n),r=0):i!==a&&l>=Re&&(qe(t-i)<_e&&(t-=i*_e),qe(s-a)<_e&&(s-=a*_e),n=OJ(t,n,s,o),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(a,n),r=0),e.point(t=s,n=o),i=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}function OJ(e,t,n,i){var r,s,o=me(e-n);return qe(o)>_e?Su((me(t)*(s=we(i))*me(n)-me(i)*(r=we(t))*me(e))/(r*s*o)):(t+i)/2}function RJ(e,t,n,i){var r;if(e==null)r=n*Ct,i.point(-Re,r),i.point(0,r),i.point(Re,r),i.point(Re,0),i.point(Re,-r),i.point(0,-r),i.point(-Re,-r),i.point(-Re,0),i.point(-Re,r);else if(qe(e[0]-t[0])>_e){var s=e[0]<t[0]?Re:-Re;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(t[0],t[1])}function LJ(e){var t=we(e),n=6*Ne,i=t>0,r=qe(t)>_e;function s(c,f,d,h){TJ(h,e,n,d,c,f)}function o(c,f){return we(c)*we(f)>t}function a(c){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(m,y){var b=[m,y],v,x=o(m,y),_=i?x?0:u(m,y):x?u(m+(m<0?Re:-Re),y):0;if(!f&&(p=h=x)&&c.lineStart(),x!==h&&(v=l(f,b),(!v||Vg(f,v)||Vg(b,v))&&(b[2]=1)),x!==h)g=0,x?(c.lineStart(),v=l(b,f),c.point(v[0],v[1])):(v=l(f,b),c.point(v[0],v[1],2),c.lineEnd()),f=v;else if(r&&f&&i^x){var k;!(_&d)&&(k=l(b,f,!0))&&(g=0,i?(c.lineStart(),c.point(k[0][0],k[0][1]),c.point(k[1][0],k[1][1]),c.lineEnd()):(c.point(k[1][0],k[1][1]),c.lineEnd(),c.lineStart(),c.point(k[0][0],k[0][1],3)))}x&&(!f||!Vg(f,b))&&c.point(b[0],b[1]),f=b,h=x,d=_},lineEnd:function(){h&&c.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function l(c,f,d){var h=Pa(c),p=Pa(f),g=[1,0,0],m=Au(h,p),y=Ig(m,m),b=m[0],v=y-b*b;if(!v)return!d&&c;var x=t*y/v,_=-t*b/v,k=Au(g,m),w=zg(g,x),$=zg(m,_);iv(w,$);var S=k,E=Ig(w,S),A=Ig(S,S),R=E*E-A*(Ig(w,w)-1);if(!(R<0)){var C=Fn(R),M=zg(S,(-E-C)/A);if(iv(M,w),M=Lg(M),!d)return M;var T=c[0],O=f[0],P=c[1],j=f[1],W;O<T&&(W=T,T=O,O=W);var ne=O-T,ae=qe(ne-Re)<_e,ke=ae||ne<_e;if(!ae&&j<P&&(W=P,P=j,j=W),ke?ae?P+j>0^M[1]<(qe(M[0]-T)<_e?P:j):P<=M[1]&&M[1]<=j:ne>Re^(T<=M[0]&&M[0]<=O)){var Ie=zg(S,(-E+C)/A);return iv(Ie,w),[M,Lg(Ie)]}}}function u(c,f){var d=i?e:Re-e,h=0;return c<-d?h|=1:c>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return LS(o,a,s,i?[0,-e]:[-Re,e-Re])}function IJ(e,t,n,i,r,s){var o=e[0],a=e[1],l=t[0],u=t[1],c=0,f=1,d=l-o,h=u-a,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<c)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>c&&(c=p)}if(p=r-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>c&&(c=p)}else if(d>0){if(p<c)return;p<f&&(f=p)}if(p=i-a,!(!h&&p>0)){if(p/=h,h<0){if(p<c)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>c&&(c=p)}if(p=s-a,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>c&&(c=p)}else if(h>0){if(p<c)return;p<f&&(f=p)}return c>0&&(e[0]=o+c*d,e[1]=a+c*h),f<1&&(t[0]=o+f*d,t[1]=a+f*h),!0}}}}}var jf=1e9,Yg=-jf;function zS(e,t,n,i){function r(u,c){return e<=u&&u<=n&&t<=c&&c<=i}function s(u,c,f,d){var h=0,p=0;if(u==null||(h=o(u,f))!==(p=o(c,f))||l(u,c)<0^f>0)do d.point(h===0||h===3?e:n,h>1?i:t);while((h=(h+f+4)%4)!==p);else d.point(c[0],c[1])}function o(u,c){return qe(u[0]-e)<_e?c>0?0:3:qe(u[0]-n)<_e?c>0?2:1:qe(u[1]-t)<_e?c>0?1:0:c>0?3:2}function a(u,c){return l(u.x,c.x)}function l(u,c){var f=o(u,1),d=o(c,1);return f!==d?f-d:f===0?c[1]-u[1]:f===1?u[0]-c[0]:f===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,f=NS(),d,h,p,g,m,y,b,v,x,_,k,w={point:$,lineStart:R,lineEnd:C,polygonStart:E,polygonEnd:A};function $(T,O){r(T,O)&&c.point(T,O)}function S(){for(var T=0,O=0,P=h.length;O<P;++O)for(var j=h[O],W=1,ne=j.length,ae=j[0],ke,Ie,Le=ae[0],We=ae[1];W<ne;++W)ke=Le,Ie=We,ae=j[W],Le=ae[0],We=ae[1],Ie<=i?We>i&&(Le-ke)*(i-Ie)>(We-Ie)*(e-ke)&&++T:We<=i&&(Le-ke)*(i-Ie)<(We-Ie)*(e-ke)&&--T;return T}function E(){c=f,d=[],h=[],k=!0}function A(){var T=S(),O=k&&T,P=(d=A4(d)).length;(O||P)&&(u.polygonStart(),O&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),P&&OS(d,a,T,s,u),u.polygonEnd()),c=u,d=h=p=null}function R(){w.point=M,h&&h.push(p=[]),_=!0,x=!1,b=v=NaN}function C(){d&&(M(g,m),y&&x&&f.rejoin(),d.push(f.result())),w.point=$,x&&c.lineEnd()}function M(T,O){var P=r(T,O);if(h&&p.push([T,O]),_)g=T,m=O,y=P,_=!1,P&&(c.lineStart(),c.point(T,O));else if(P&&x)c.point(T,O);else{var j=[b=Math.max(Yg,Math.min(jf,b)),v=Math.max(Yg,Math.min(jf,v))],W=[T=Math.max(Yg,Math.min(jf,T)),O=Math.max(Yg,Math.min(jf,O))];IJ(j,W,e,t,n,i)?(x||(c.lineStart(),c.point(j[0],j[1])),c.point(W[0],W[1]),P||c.lineEnd(),k=!1):P&&(c.lineStart(),c.point(T,O),k=!1)}b=T,v=O,x=P}return w}}function PS(e,t,n){var i=hi(e,t-_e,n).concat(t);return function(r){return i.map(function(s){return[r,s]})}}function BS(e,t,n){var i=hi(e,t-_e,n).concat(t);return function(r){return i.map(function(s){return[s,r]})}}function zJ(){var e,t,n,i,r,s,o,a,l=10,u=l,c=90,f=360,d,h,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return hi(Fg(i/c)*c,n,c).map(p).concat(hi(Fg(a/f)*f,o,f).map(g)).concat(hi(Fg(t/l)*l,e,l).filter(function(v){return qe(v%c)>_e}).map(d)).concat(hi(Fg(s/u)*u,r,u).filter(function(v){return qe(v%f)>_e}).map(h))}return y.lines=function(){return b().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(o).slice(1),p(n).reverse().slice(1),g(a).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(i=+v[0][0],n=+v[1][0],a=+v[0][1],o=+v[1][1],i>n&&(v=i,i=n,n=v),a>o&&(v=a,a=o,o=v),y.precision(m)):[[i,a],[n,o]]},y.extentMinor=function(v){return arguments.length?(t=+v[0][0],e=+v[1][0],s=+v[0][1],r=+v[1][1],t>e&&(v=t,t=e,e=v),s>r&&(v=s,s=r,r=v),y.precision(m)):[[t,s],[e,r]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(c=+v[0],f=+v[1],y):[c,f]},y.stepMinor=function(v){return arguments.length?(l=+v[0],u=+v[1],y):[l,u]},y.precision=function(v){return arguments.length?(m=+v,d=PS(s,r,90),h=BS(t,e,m),p=PS(a,o,90),g=BS(i,n,m),y):m},y.extentMajor([[-180,-90+_e],[180,90-_e]]).extentMinor([[-180,-80-_e],[180,80+_e]])}const Uf=e=>e;var dv=new Sn,hv=new Sn,jS,US,pv,gv,Io={point:sn,lineStart:sn,lineEnd:sn,polygonStart:function(){Io.lineStart=PJ,Io.lineEnd=jJ},polygonEnd:function(){Io.lineStart=Io.lineEnd=Io.point=sn,dv.add(qe(hv)),hv=new Sn},result:function(){var e=dv/2;return dv=new Sn,e}};function PJ(){Io.point=BJ}function BJ(e,t){Io.point=qS,jS=pv=e,US=gv=t}function qS(e,t){hv.add(gv*e-pv*t),pv=e,gv=t}function jJ(){qS(jS,US)}const WS=Io;var Mu=1/0,Zg=Mu,qf=-Mu,Kg=qf,UJ={point:qJ,lineStart:sn,lineEnd:sn,polygonStart:sn,polygonEnd:sn,result:function(){var e=[[Mu,Zg],[qf,Kg]];return qf=Kg=-(Zg=Mu=1/0),e}};function qJ(e,t){e<Mu&&(Mu=e),e>qf&&(qf=e),t<Zg&&(Zg=t),t>Kg&&(Kg=t)}const Jg=UJ;var mv=0,yv=0,Wf=0,Qg=0,e0=0,Fu=0,bv=0,vv=0,Hf=0,HS,GS,Yr,Zr,ar={point:ja,lineStart:VS,lineEnd:XS,polygonStart:function(){ar.lineStart=GJ,ar.lineEnd=VJ},polygonEnd:function(){ar.point=ja,ar.lineStart=VS,ar.lineEnd=XS},result:function(){var e=Hf?[bv/Hf,vv/Hf]:Fu?[Qg/Fu,e0/Fu]:Wf?[mv/Wf,yv/Wf]:[NaN,NaN];return mv=yv=Wf=Qg=e0=Fu=bv=vv=Hf=0,e}};function ja(e,t){mv+=e,yv+=t,++Wf}function VS(){ar.point=WJ}function WJ(e,t){ar.point=HJ,ja(Yr=e,Zr=t)}function HJ(e,t){var n=e-Yr,i=t-Zr,r=Fn(n*n+i*i);Qg+=r*(Yr+e)/2,e0+=r*(Zr+t)/2,Fu+=r,ja(Yr=e,Zr=t)}function XS(){ar.point=ja}function GJ(){ar.point=XJ}function VJ(){YS(HS,GS)}function XJ(e,t){ar.point=YS,ja(HS=Yr=e,GS=Zr=t)}function YS(e,t){var n=e-Yr,i=t-Zr,r=Fn(n*n+i*i);Qg+=r*(Yr+e)/2,e0+=r*(Zr+t)/2,Fu+=r,r=Zr*e-Yr*t,bv+=r*(Yr+e),vv+=r*(Zr+t),Hf+=r*3,ja(Yr=e,Zr=t)}const ZS=ar;function KS(e){this._context=e}KS.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Mn);break}}},result:sn};var xv=new Sn,_v,JS,QS,Gf,Vf,t0={point:sn,lineStart:function(){t0.point=YJ},lineEnd:function(){_v&&eA(JS,QS),t0.point=sn},polygonStart:function(){_v=!0},polygonEnd:function(){_v=null},result:function(){var e=+xv;return xv=new Sn,e}};function YJ(e,t){t0.point=eA,JS=Gf=e,QS=Vf=t}function eA(e,t){Gf-=e,Vf-=t,xv.add(Fn(Gf*Gf+Vf*Vf)),Gf=e,Vf=t}const tA=t0;let nA,n0,iA,rA;class sA{constructor(t){this._append=t==null?oA:ZJ(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==iA||this._append!==n0){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,iA=i,n0=this._append,rA=this._,this._=r}this._+=rA;break}}}result(){const t=this._;return this._="",t.length?t:null}}function oA(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ZJ(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return oA;if(t!==nA){const n=10**t;nA=t,n0=function(r){let s=1;this._+=r[0];for(const o=r.length;s<o;++s)this._+=Math.round(arguments[s]*n)/n+r[s]}}return n0}function aA(e,t){let n=3,i=4.5,r,s;function o(a){return a&&(typeof i=="function"&&s.pointRadius(+i.apply(this,arguments)),Ms(a,r(s))),s.result()}return o.area=function(a){return Ms(a,r(WS)),WS.result()},o.measure=function(a){return Ms(a,r(tA)),tA.result()},o.bounds=function(a){return Ms(a,r(Jg)),Jg.result()},o.centroid=function(a){return Ms(a,r(ZS)),ZS.result()},o.projection=function(a){return arguments.length?(r=a==null?(e=null,Uf):(e=a).stream,o):e},o.context=function(a){return arguments.length?(s=a==null?(t=null,new sA(n)):new KS(t=a),typeof i!="function"&&s.pointRadius(i),o):t},o.pointRadius=function(a){return arguments.length?(i=typeof a=="function"?a:(s.pointRadius(+a),+a),o):i},o.digits=function(a){if(!arguments.length)return n;if(a==null)n=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);n=l}return t===null&&(s=new sA(n)),o},o.projection(e).digits(n).context(t)}function i0(e){return function(t){var n=new wv;for(var i in e)n[i]=e[i];return n.stream=t,n}}function wv(){}wv.prototype={constructor:wv,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function kv(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),Ms(n,e.stream(Jg)),t(Jg.result()),i!=null&&e.clipExtent(i),e}function r0(e,t,n){return kv(e,function(i){var r=t[1][0]-t[0][0],s=t[1][1]-t[0][1],o=Math.min(r/(i[1][0]-i[0][0]),s/(i[1][1]-i[0][1])),a=+t[0][0]+(r-o*(i[1][0]+i[0][0]))/2,l=+t[0][1]+(s-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([a,l])},n)}function $v(e,t,n){return r0(e,[[0,0],t],n)}function Ev(e,t,n){return kv(e,function(i){var r=+t,s=r/(i[1][0]-i[0][0]),o=(r-s*(i[1][0]+i[0][0]))/2,a=-s*i[0][1];e.scale(150*s).translate([o,a])},n)}function Cv(e,t,n){return kv(e,function(i){var r=+t,s=r/(i[1][1]-i[0][1]),o=-s*i[0][0],a=(r-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([o,a])},n)}var lA=16,KJ=we(30*Ne);function uA(e,t){return+t?QJ(e,t):JJ(e)}function JJ(e){return i0({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function QJ(e,t){function n(i,r,s,o,a,l,u,c,f,d,h,p,g,m){var y=u-i,b=c-r,v=y*y+b*b;if(v>4*t&&g--){var x=o+d,_=a+h,k=l+p,w=Fn(x*x+_*_+k*k),$=Qn(k/=w),S=qe(qe(k)-1)<_e||qe(s-f)<_e?(s+f)/2:Li(_,x),E=e(S,$),A=E[0],R=E[1],C=A-i,M=R-r,T=b*C-y*M;(T*T/v>t||qe((y*C+b*M)/v-.5)>.3||o*d+a*h+l*p<KJ)&&(n(i,r,s,o,a,l,A,R,S,x/=w,_/=w,k,g,m),m.point(A,R),n(A,R,S,x,_,k,u,c,f,d,h,p,g,m))}}return function(i){var r,s,o,a,l,u,c,f,d,h,p,g,m={point:y,lineStart:b,lineEnd:x,polygonStart:function(){i.polygonStart(),m.lineStart=_},polygonEnd:function(){i.polygonEnd(),m.lineStart=b}};function y($,S){$=e($,S),i.point($[0],$[1])}function b(){f=NaN,m.point=v,i.lineStart()}function v($,S){var E=Pa([$,S]),A=e($,S);n(f,d,c,h,p,g,f=A[0],d=A[1],c=$,h=E[0],p=E[1],g=E[2],lA,i),i.point(f,d)}function x(){m.point=y,i.lineEnd()}function _(){b(),m.point=k,m.lineEnd=w}function k($,S){v(r=$,S),s=f,o=d,a=h,l=p,u=g,m.point=v}function w(){n(f,d,c,h,p,g,s,o,r,a,l,u,lA,i),m.lineEnd=x,x()}return m}}var eQ=i0({point:function(e,t){this.stream.point(e*Ne,t*Ne)}});function tQ(e){return i0({point:function(t,n){var i=e(t,n);return this.stream.point(i[0],i[1])}})}function nQ(e,t,n,i,r){function s(o,a){return o*=i,a*=r,[t+e*o,n-e*a]}return s.invert=function(o,a){return[(o-t)/e*i,(n-a)/e*r]},s}function cA(e,t,n,i,r,s){if(!s)return nQ(e,t,n,i,r);var o=we(s),a=me(s),l=o*e,u=a*e,c=o/e,f=a/e,d=(a*n-o*t)/e,h=(a*t+o*n)/e;function p(g,m){return g*=i,m*=r,[l*g-u*m+t,n-u*g-l*m]}return p.invert=function(g,m){return[i*(c*g-f*m+d),r*(h-f*g-c*m)]},p}function Kr(e){return fA(function(){return e})()}function fA(e){var t,n=150,i=480,r=250,s=0,o=0,a=0,l=0,u=0,c,f=0,d=1,h=1,p=null,g=IS,m=null,y,b,v,x=Uf,_=.5,k,w,$,S,E;function A(T){return $(T[0]*Ne,T[1]*Ne)}function R(T){return T=$.invert(T[0],T[1]),T&&[T[0]*Mt,T[1]*Mt]}A.stream=function(T){return S&&E===T?S:S=eQ(tQ(c)(g(k(x(E=T)))))},A.preclip=function(T){return arguments.length?(g=T,p=void 0,M()):g},A.postclip=function(T){return arguments.length?(x=T,m=y=b=v=null,M()):x},A.clipAngle=function(T){return arguments.length?(g=+T?LJ(p=T*Ne):(p=null,IS),M()):p*Mt},A.clipExtent=function(T){return arguments.length?(x=T==null?(m=y=b=v=null,Uf):zS(m=+T[0][0],y=+T[0][1],b=+T[1][0],v=+T[1][1]),M()):m==null?null:[[m,y],[b,v]]},A.scale=function(T){return arguments.length?(n=+T,C()):n},A.translate=function(T){return arguments.length?(i=+T[0],r=+T[1],C()):[i,r]},A.center=function(T){return arguments.length?(s=T[0]%360*Ne,o=T[1]%360*Ne,C()):[s*Mt,o*Mt]},A.rotate=function(T){return arguments.length?(a=T[0]%360*Ne,l=T[1]%360*Ne,u=T.length>2?T[2]%360*Ne:0,C()):[a*Mt,l*Mt,u*Mt]},A.angle=function(T){return arguments.length?(f=T%360*Ne,C()):f*Mt},A.reflectX=function(T){return arguments.length?(d=T?-1:1,C()):d<0},A.reflectY=function(T){return arguments.length?(h=T?-1:1,C()):h<0},A.precision=function(T){return arguments.length?(k=uA(w,_=T*T),M()):Fn(_)},A.fitExtent=function(T,O){return r0(A,T,O)},A.fitSize=function(T,O){return $v(A,T,O)},A.fitWidth=function(T,O){return Ev(A,T,O)},A.fitHeight=function(T,O){return Cv(A,T,O)};function C(){var T=cA(n,0,0,d,h,f).apply(null,t(s,o)),O=cA(n,i-T[0],r-T[1],d,h,f);return c=AS(a,l,u),w=uv(t,O),$=uv(c,w),k=uA(w,_),M()}function M(){return S=E=null,A}return function(){return t=e.apply(this,arguments),A.invert=t.invert&&R,C()}}function Sv(e){var t=0,n=Re/3,i=fA(e),r=i(t,n);return r.parallels=function(s){return arguments.length?i(t=s[0]*Ne,n=s[1]*Ne):[t*Mt,n*Mt]},r}function iQ(e){var t=we(e);function n(i,r){return[i*t,me(r)/t]}return n.invert=function(i,r){return[i/t,Qn(r*t)]},n}function rQ(e,t){var n=me(e),i=(n+me(t))/2;if(qe(i)<_e)return iQ(e);var r=1+n*(2*i-n),s=Fn(r)/i;function o(a,l){var u=Fn(r-2*i*me(l))/i;return[u*me(a*=i),s-u*we(a)]}return o.invert=function(a,l){var u=s-l,c=Li(a,qe(u))*Ii(u);return u*i<0&&(c-=Re*Ii(a)*Ii(u)),[c/i,Qn((r-(a*a+u*u)*i*i)/(2*i))]},o}function s0(){return Sv(rQ).scale(155.424).center([0,33.6442])}function dA(){return s0().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function sQ(e){var t=e.length;return{point:function(n,i){for(var r=-1;++r<t;)e[r].point(n,i)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function oQ(){var e,t,n=dA(),i,r=s0().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s,o=s0().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,u={point:function(d,h){l=[d,h]}};function c(d){var h=d[0],p=d[1];return l=null,i.point(h,p),l||(s.point(h,p),l)||(a.point(h,p),l)}c.invert=function(d){var h=n.scale(),p=n.translate(),g=(d[0]-p[0])/h,m=(d[1]-p[1])/h;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?r:m>=.166&&m<.234&&g>=-.214&&g<-.115?o:n).invert(d)},c.stream=function(d){return e&&t===d?e:e=sQ([n.stream(t=d),r.stream(d),o.stream(d)])},c.precision=function(d){return arguments.length?(n.precision(d),r.precision(d),o.precision(d),f()):n.precision()},c.scale=function(d){return arguments.length?(n.scale(d),r.scale(d*.35),o.scale(d),c.translate(n.translate())):n.scale()},c.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],g=+d[1];return i=n.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(u),s=r.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+_e,g+.12*h+_e],[p-.214*h-_e,g+.234*h-_e]]).stream(u),a=o.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+_e,g+.166*h+_e],[p-.115*h-_e,g+.234*h-_e]]).stream(u),f()},c.fitExtent=function(d,h){return r0(c,d,h)},c.fitSize=function(d,h){return $v(c,d,h)},c.fitWidth=function(d,h){return Ev(c,d,h)},c.fitHeight=function(d,h){return Cv(c,d,h)};function f(){return e=t=null,c}return c.scale(1070)}function hA(e){return function(t,n){var i=we(t),r=we(n),s=e(i*r);return s===1/0?[2,0]:[s*r*me(t),s*me(n)]}}function Xf(e){return function(t,n){var i=Fn(t*t+n*n),r=e(i),s=me(r),o=we(r);return[Li(t*s,i*o),Qn(i&&n*s/i)]}}var pA=hA(function(e){return Fn(2/(1+e))});pA.invert=Xf(function(e){return 2*Qn(e/2)});function aQ(){return Kr(pA).scale(124.75).clipAngle(180-.001)}var gA=hA(function(e){return(e=uS(e))&&e/me(e)});gA.invert=Xf(function(e){return e});function lQ(){return Kr(gA).scale(79.4188).clipAngle(180-.001)}function o0(e,t){return[e,Dg(J3((Ct+t)/2))]}o0.invert=function(e,t){return[e,2*Su(lS(t))-Ct]};function uQ(){return mA(o0).scale(961/Mn)}function mA(e){var t=Kr(e),n=t.center,i=t.scale,r=t.translate,s=t.clipExtent,o=null,a,l,u;t.scale=function(f){return arguments.length?(i(f),c()):i()},t.translate=function(f){return arguments.length?(r(f),c()):r()},t.center=function(f){return arguments.length?(n(f),c()):n()},t.clipExtent=function(f){return arguments.length?(f==null?o=a=l=u=null:(o=+f[0][0],a=+f[0][1],l=+f[1][0],u=+f[1][1]),c()):o==null?null:[[o,a],[l,u]]};function c(){var f=Re*i(),d=t(AJ(t.rotate()).invert([0,0]));return s(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===o0?[[Math.max(d[0]-f,o),a],[Math.min(d[0]+f,l),u]]:[[o,Math.max(d[1]-f,a)],[l,Math.min(d[1]+f,u)]])}return c()}function a0(e){return J3((Ct+e)/2)}function cQ(e,t){var n=we(e),i=e===t?me(e):Dg(n/we(t))/Dg(a0(t)/a0(e)),r=n*K3(a0(e),i)/i;if(!i)return o0;function s(o,a){r>0?a<-Ct+_e&&(a=-Ct+_e):a>Ct-_e&&(a=Ct-_e);var l=r/K3(a0(a),i);return[l*me(i*o),r-l*we(i*o)]}return s.invert=function(o,a){var l=r-a,u=Ii(i)*Fn(o*o+l*l),c=Li(o,qe(l))*Ii(l);return l*i<0&&(c-=Re*Ii(o)*Ii(l)),[c/i,2*Su(K3(r/u,1/i))-Ct]},s}function fQ(){return Sv(cQ).scale(109.5).parallels([30,30])}function l0(e,t){return[e,t]}l0.invert=l0;function dQ(){return Kr(l0).scale(152.63)}function hQ(e,t){var n=we(e),i=e===t?me(e):(n-we(t))/(t-e),r=n/i+e;if(qe(i)<_e)return l0;function s(o,a){var l=r-a,u=i*o;return[l*me(u),r-l*we(u)]}return s.invert=function(o,a){var l=r-a,u=Li(o,qe(l))*Ii(l);return l*i<0&&(u-=Re*Ii(o)*Ii(l)),[u/i,r-Ii(i)*Fn(o*o+l*l)]},s}function pQ(){return Sv(hQ).scale(131.154).center([0,13.9389])}var Yf=1.340264,Zf=-.081106,Kf=893e-6,Jf=.003796,u0=Fn(3)/2,gQ=12;function yA(e,t){var n=Qn(u0*me(t)),i=n*n,r=i*i*i;return[e*we(n)/(u0*(Yf+3*Zf*i+r*(7*Kf+9*Jf*i))),n*(Yf+Zf*i+r*(Kf+Jf*i))]}yA.invert=function(e,t){for(var n=t,i=n*n,r=i*i*i,s=0,o,a,l;s<gQ&&(a=n*(Yf+Zf*i+r*(Kf+Jf*i))-t,l=Yf+3*Zf*i+r*(7*Kf+9*Jf*i),n-=o=a/l,i=n*n,r=i*i*i,!(qe(o)<Tg));++s);return[u0*e*(Yf+3*Zf*i+r*(7*Kf+9*Jf*i))/we(n),Qn(me(n)/u0)]};function mQ(){return Kr(yA).scale(177.158)}function bA(e,t){var n=we(t),i=we(e)*n;return[n*me(e)/i,me(t)/i]}bA.invert=Xf(Su);function yQ(){return Kr(bA).scale(144.049).clipAngle(60)}function bQ(){var e=1,t=0,n=0,i=1,r=1,s=0,o,a,l=null,u,c,f,d=1,h=1,p=i0({point:function(x,_){var k=v([x,_]);this.stream.point(k[0],k[1])}}),g=Uf,m,y;function b(){return d=e*i,h=e*r,m=y=null,v}function v(x){var _=x[0]*d,k=x[1]*h;if(s){var w=k*o-_*a;_=_*o+k*a,k=w}return[_+t,k+n]}return v.invert=function(x){var _=x[0]-t,k=x[1]-n;if(s){var w=k*o+_*a;_=_*o-k*a,k=w}return[_/d,k/h]},v.stream=function(x){return m&&y===x?m:m=p(g(y=x))},v.postclip=function(x){return arguments.length?(g=x,l=u=c=f=null,b()):g},v.clipExtent=function(x){return arguments.length?(g=x==null?(l=u=c=f=null,Uf):zS(l=+x[0][0],u=+x[0][1],c=+x[1][0],f=+x[1][1]),b()):l==null?null:[[l,u],[c,f]]},v.scale=function(x){return arguments.length?(e=+x,b()):e},v.translate=function(x){return arguments.length?(t=+x[0],n=+x[1],b()):[t,n]},v.angle=function(x){return arguments.length?(s=x%360*Ne,a=me(s),o=we(s),b()):s*Mt},v.reflectX=function(x){return arguments.length?(i=x?-1:1,b()):i<0},v.reflectY=function(x){return arguments.length?(r=x?-1:1,b()):r<0},v.fitExtent=function(x,_){return r0(v,x,_)},v.fitSize=function(x,_){return $v(v,x,_)},v.fitWidth=function(x,_){return Ev(v,x,_)},v.fitHeight=function(x,_){return Cv(v,x,_)},v}function vA(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),t*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}vA.invert=function(e,t){var n=t,i=25,r;do{var s=n*n,o=s*s;n-=r=(n*(1.007226+s*(.015085+o*(-.044475+.028874*s-.005916*o)))-t)/(1.007226+s*(.015085*3+o*(-.044475*7+.028874*9*s-.005916*11*o)))}while(qe(r)>_e&&--i>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function vQ(){return Kr(vA).scale(175.295)}function xA(e,t){return[we(t)*me(e),me(t)]}xA.invert=Xf(Qn);function xQ(){return Kr(xA).scale(249.5).clipAngle(90+_e)}function _A(e,t){var n=we(t),i=1+we(e)*n;return[n*me(e)/i,me(t)/i]}_A.invert=Xf(function(e){return 2*Su(e)});function _Q(){return Kr(_A).scale(250).clipAngle(142)}function wA(e,t){return[Dg(J3((Ct+t)/2)),-e]}wA.invert=function(e,t){return[-t,2*Su(lS(e))-Ct]};function wQ(){var e=mA(wA),t=e.center,n=e.rotate;return e.center=function(i){return arguments.length?t([-i[1],i[0]]):(i=t(),[i[1],-i[0]])},e.rotate=function(i){return arguments.length?n([i[0],i[1],i.length>2?i[2]+90:90]):(i=n(),[i[0],i[1],i[2]-90])},n([0,0,90]).scale(159.155)}var kQ=Math.abs,Av=Math.cos,c0=Math.sin,$Q=1e-6,kA=Math.PI,Tv=kA/2,$A=EQ(2);function EA(e){return e>1?Tv:e<-1?-Tv:Math.asin(e)}function EQ(e){return e>0?Math.sqrt(e):0}function CQ(e,t){var n=e*c0(t),i=30,r;do t-=r=(t+c0(t)-n)/(1+Av(t));while(kQ(r)>$Q&&--i>0);return t/2}function SQ(e,t,n){function i(r,s){return[e*r*Av(s=CQ(n,s)),t*c0(s)]}return i.invert=function(r,s){return s=EA(s/t),[r/(e*Av(s)),EA((2*s+c0(2*s))/n)]},i}var AQ=SQ($A/Tv,$A,kA);function TQ(){return Kr(AQ).scale(169.529)}const MQ=aA(),Mv=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function FQ(e,t){return function n(){const i=t();return i.type=e,i.path=aA().projection(i),i.copy=i.copy||function(){const r=n();return Mv.forEach(s=>{i[s]&&r[s](i[s]())}),r.path.pointRadius(i.path.pointRadius()),r},A$(i)}}function Fv(e,t){if(!e||typeof e!="string")throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(f0[e]=FQ(e,t),this):f0[e]||null}function CA(e){return e&&e.path||MQ}const f0={albers:dA,albersusa:oQ,azimuthalequalarea:aQ,azimuthalequidistant:lQ,conicconformal:fQ,conicequalarea:s0,conicequidistant:pQ,equalEarth:mQ,equirectangular:dQ,gnomonic:yQ,identity:bQ,mercator:uQ,mollweide:TQ,naturalEarth1:vQ,orthographic:xQ,stereographic:_Q,transversemercator:wQ};for(const e in f0)Fv(e,f0[e]);function DQ(){}const Ns=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function SA(){var e=1,t=1,n=a;function i(l,u){return u.map(c=>r(l,c))}function r(l,u){var c=[],f=[];return s(l,u,d=>{n(d,l,u),NQ(d)>0?c.push([d]):f.push(d)}),f.forEach(d=>{for(var h=0,p=c.length,g;h<p;++h)if(OQ((g=c[h])[0],d)!==-1){g.push(d);return}}),{type:"MultiPolygon",value:u,coordinates:c}}function s(l,u,c){var f=new Array,d=new Array,h,p,g,m,y,b;for(h=p=-1,m=l[0]>=u,Ns[m<<1].forEach(v);++h<e-1;)g=m,m=l[h+1]>=u,Ns[g|m<<1].forEach(v);for(Ns[m<<0].forEach(v);++p<t-1;){for(h=-1,m=l[p*e+e]>=u,y=l[p*e]>=u,Ns[m<<1|y<<2].forEach(v);++h<e-1;)g=m,m=l[p*e+e+h+1]>=u,b=y,y=l[p*e+h+1]>=u,Ns[g|m<<1|y<<2|b<<3].forEach(v);Ns[m|y<<3].forEach(v)}for(h=-1,y=l[p*e]>=u,Ns[y<<2].forEach(v);++h<e-1;)b=y,y=l[p*e+h+1]>=u,Ns[y<<2|b<<3].forEach(v);Ns[y<<3].forEach(v);function v(x){var _=[x[0][0]+h,x[0][1]+p],k=[x[1][0]+h,x[1][1]+p],w=o(_),$=o(k),S,E;(S=d[w])?(E=f[$])?(delete d[S.end],delete f[E.start],S===E?(S.ring.push(k),c(S.ring)):f[S.start]=d[E.end]={start:S.start,end:E.end,ring:S.ring.concat(E.ring)}):(delete d[S.end],S.ring.push(k),d[S.end=$]=S):(S=f[$])?(E=d[w])?(delete f[S.start],delete d[E.end],S===E?(S.ring.push(k),c(S.ring)):f[E.start]=d[S.end]={start:E.start,end:S.end,ring:E.ring.concat(S.ring)}):(delete f[S.start],S.ring.unshift(_),f[S.start=w]=S):f[w]=d[$]={start:w,end:$,ring:[_,k]}}}function o(l){return l[0]*2+l[1]*(e+1)*4}function a(l,u,c){l.forEach(f=>{var d=f[0],h=f[1],p=d|0,g=h|0,m,y=u[g*e+p];d>0&&d<e&&p===d&&(m=u[g*e+p-1],f[0]=d+(c-m)/(y-m)-.5),h>0&&h<t&&g===h&&(m=u[(g-1)*e+p],f[1]=h+(c-m)/(y-m)-.5)})}return i.contour=r,i.size=function(l){if(!arguments.length)return[e,t];var u=Math.floor(l[0]),c=Math.floor(l[1]);return u>=0&&c>=0||U("invalid size"),e=u,t=c,i},i.smooth=function(l){return arguments.length?(n=l?a:DQ,i):n===a},i}function NQ(e){for(var t=0,n=e.length,i=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)i+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return i}function OQ(e,t){for(var n=-1,i=t.length,r;++n<i;)if(r=RQ(e,t[n]))return r;return 0}function RQ(e,t){for(var n=t[0],i=t[1],r=-1,s=0,o=e.length,a=o-1;s<o;a=s++){var l=e[s],u=l[0],c=l[1],f=e[a],d=f[0],h=f[1];if(LQ(l,f,t))return 0;c>i!=h>i&&n<(d-u)*(i-c)/(h-c)+u&&(r=-r)}return r}function LQ(e,t,n){var i;return IQ(e,t,n)&&zQ(e[i=+(e[0]===t[0])],n[i],t[i])}function IQ(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function zQ(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function AA(e,t,n){return function(i){var r=Rr(i),s=n?Math.min(r[0],0):r[0],o=r[1],a=o-s,l=t?lo(s,o,e):a/(e+1);return hi(s+l,o,l)}}function Dv(e){I.call(this,null,e)}Dv.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},K(Dv,I,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=e.field||dn,s=SA().smooth(e.smooth!==!1),o=e.thresholds||PQ(i,r,e),a=e.as===null?null:e.as||"contour",l=[];return i.forEach(u=>{const c=r(u),f=s.size([c.width,c.height])(c.values,q(o)?o:o(c.values));BQ(f,c,u,e),f.forEach(d=>{l.push(rp(u,et(a!=null?{[a]:d}:d)))})}),this.value&&(n.rem=this.value),this.value=n.source=n.add=l,n}});function PQ(e,t,n){const i=AA(n.levels||10,n.nice,n.zero!==!1);return n.resolve!=="shared"?i:i(e.map(r=>ga(t(r).values)))}function BQ(e,t,n,i){let r=i.scale||t.scale,s=i.translate||t.translate;if(Me(r)&&(r=r(n,i)),Me(s)&&(s=s(n,i)),(r===1||r==null)&&!s)return;const o=(Xe(r)?r:r[0])||1,a=(Xe(r)?r:r[1])||1,l=s&&s[0]||0,u=s&&s[1]||0;e.forEach(TA(t,o,a,l,u))}function TA(e,t,n,i,r){const s=e.x1||0,o=e.y1||0,a=t*n<0;function l(f){f.forEach(u)}function u(f){a&&f.reverse(),f.forEach(c)}function c(f){f[0]=(f[0]-s)*t+i,f[1]=(f[1]-o)*n+r}return function(f){return f.coordinates.forEach(l),f}}function MA(e,t,n){const i=e>=0?e:iy(t,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function Nv(e){return Me(e)?e:pn(+e)}function FA(){var e=l=>l[0],t=l=>l[1],n=ql,i=[-1,-1],r=960,s=500,o=2;function a(l,u){const c=MA(i[0],l,e)>>o,f=MA(i[1],l,t)>>o,d=c?c+2:0,h=f?f+2:0,p=2*d+(r>>o),g=2*h+(s>>o),m=new Float32Array(p*g),y=new Float32Array(p*g);let b=m;l.forEach(x=>{const _=d+(+e(x)>>o),k=h+(+t(x)>>o);_>=0&&_<p&&k>=0&&k<g&&(m[_+k*p]+=+n(x))}),c>0&&f>0?(Du(p,g,m,y,c),Nu(p,g,y,m,f),Du(p,g,m,y,c),Nu(p,g,y,m,f),Du(p,g,m,y,c),Nu(p,g,y,m,f)):c>0?(Du(p,g,m,y,c),Du(p,g,y,m,c),Du(p,g,m,y,c),b=y):f>0&&(Nu(p,g,m,y,f),Nu(p,g,y,m,f),Nu(p,g,m,y,f),b=y);const v=u?Math.pow(2,-2*o):1/T4(b);for(let x=0,_=p*g;x<_;++x)b[x]*=v;return{values:b,scale:1<<o,width:p,height:g,x1:d,y1:h,x2:d+(r>>o),y2:h+(s>>o)}}return a.x=function(l){return arguments.length?(e=Nv(l),a):e},a.y=function(l){return arguments.length?(t=Nv(l),a):t},a.weight=function(l){return arguments.length?(n=Nv(l),a):n},a.size=function(l){if(!arguments.length)return[r,s];var u=+l[0],c=+l[1];return u>=0&&c>=0||U("invalid size"),r=u,s=c,a},a.cellSize=function(l){return arguments.length?((l=+l)>=1||U("invalid cell size"),o=Math.floor(Math.log(l)/Math.LN2),a):1<<o},a.bandwidth=function(l){return arguments.length?(l=ee(l),l.length===1&&(l=[+l[0],+l[0]]),l.length!==2&&U("invalid bandwidth"),i=l,a):i},a}function Du(e,t,n,i,r){const s=(r<<1)+1;for(let o=0;o<t;++o)for(let a=0,l=0;a<e+r;++a)a<e&&(l+=n[a+o*e]),a>=r&&(a>=s&&(l-=n[a-s+o*e]),i[a-r+o*e]=l/Math.min(a+1,e-1+s-a,s))}function Nu(e,t,n,i,r){const s=(r<<1)+1;for(let o=0;o<e;++o)for(let a=0,l=0;a<t+r;++a)a<t&&(l+=n[o+a*e]),a>=r&&(a>=s&&(l-=n[o+(a-s)*e]),i[o+(a-r)*e]=l/Math.min(a+1,t-1+s-a,s))}function Ov(e){I.call(this,null,e)}Ov.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const jQ=["x","y","weight","size","cellSize","bandwidth"];function DA(e,t){return jQ.forEach(n=>t[n]!=null?e[n](t[n]):0),e}K(Ov,I,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=t.materialize(t.SOURCE).source,r=UQ(i,e.groupby),s=(e.groupby||[]).map(Et),o=DA(FA(),e),a=e.as||"grid",l=[];function u(c,f){for(let d=0;d<s.length;++d)c[s[d]]=f[d];return c}return l=r.map(c=>et(u({[a]:o(c,e.counts)},c.dims))),this.value&&(n.rem=this.value),this.value=n.source=n.add=l,n}});function UQ(e,t){var n=[],i=c=>c(a),r,s,o,a,l,u;if(t==null)n.push(e);else for(r={},s=0,o=e.length;s<o;++s)a=e[s],l=t.map(i),u=r[l],u||(r[l]=u=[],u.dims=l,n.push(u)),u.push(a);return n}function Rv(e){I.call(this,null,e)}Rv.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0},{name:"smooth",type:"boolean",default:!0}]},K(Rv,I,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=SA().smooth(e.smooth!==!1),r=e.values,s=e.thresholds||AA(e.count||10,e.nice,!!r),o=e.size,a,l;return r||(r=t.materialize(t.SOURCE).source,a=DA(FA(),e)(r,!0),l=TA(a,a.scale||1,a.scale||1,0,0),o=[a.width,a.height],r=a.values),s=q(s)?s:s(r),r=i.size(o)(r,s),l&&r.forEach(l),this.value&&(n.rem=this.value),this.value=n.source=n.add=(r||[]).map(et),n}});const Lv="Feature",Iv="FeatureCollection",qQ="MultiPoint";function zv(e){I.call(this,null,e)}zv.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},K(zv,I,{transform(e,t){var n=this._features,i=this._points,r=e.fields,s=r&&r[0],o=r&&r[1],a=e.geojson||!r&&dn,l=t.ADD,u;u=e.modified()||t.changed(t.REM)||t.modified(fn(a))||s&&t.modified(fn(s))||o&&t.modified(fn(o)),(!this.value||u)&&(l=t.SOURCE,this._features=n=[],this._points=i=[]),a&&t.visit(l,c=>n.push(a(c))),s&&o&&(t.visit(l,c=>{var f=s(c),d=o(c);f!=null&&d!=null&&(f=+f)===f&&(d=+d)===d&&i.push([f,d])}),n=n.concat({type:Lv,geometry:{type:qQ,coordinates:i}})),this.value={type:Iv,features:n}}});function Pv(e){I.call(this,null,e)}Pv.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},K(Pv,I,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.field||dn,s=e.as||"path",o=n.SOURCE;!i||e.modified()?(this.value=i=CA(e.projection),n.materialize().reflow()):o=r===dn||t.modified(r.fields)?n.ADD_MOD:n.ADD;const a=WQ(i,e.pointRadius);return n.visit(o,l=>l[s]=i(r(l))),i.pointRadius(a),n.modifies(s)}});function WQ(e,t){const n=e.pointRadius();return e.context(null),t!=null&&e.pointRadius(t),n}function Bv(e){I.call(this,null,e)}Bv.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},K(Bv,I,{transform(e,t){var n=e.projection,i=e.fields[0],r=e.fields[1],s=e.as||["x","y"],o=s[0],a=s[1],l;function u(c){const f=n([i(c),r(c)]);f?(c[o]=f[0],c[a]=f[1]):(c[o]=void 0,c[a]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,u):(l=t.modified(i.fields)||t.modified(r.fields),t.visit(l?t.ADD_MOD:t.ADD,u)),t.modifies(s)}});function jv(e){I.call(this,null,e)}jv.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},K(jv,I,{transform(e,t){var n=t.fork(t.ALL),i=this.value,r=e.as||"shape",s=n.ADD;return(!i||e.modified())&&(this.value=i=HQ(CA(e.projection),e.field||Ai("datum"),e.pointRadius),n.materialize().reflow(),s=n.SOURCE),n.visit(s,o=>o[r]=i),n.modifies(r)}});function HQ(e,t,n){const i=n==null?r=>e(t(r)):r=>{var s=e.pointRadius(),o=e.pointRadius(n)(t(r));return e.pointRadius(s),o};return i.context=r=>(e.context(r),i),i}function Uv(e){I.call(this,[],e),this.generator=zJ()}Uv.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},K(Uv,I,{transform(e,t){var n=this.value,i=this.generator,r;if(!n.length||e.modified())for(const s in e)Me(i[s])&&i[s](e[s]);return r=i(),n.length?t.mod.push(H8(n[0],r)):t.add.push(et(r)),n[0]=r,t}});function qv(e){I.call(this,null,e)}qv.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},K(qv,I,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,i=e.resolve==="shared",r=e.field||dn,s=VQ(e.opacity,e),o=GQ(e.color,e),a=e.as||"image",l={$x:0,$y:0,$value:0,$max:i?ga(n.map(u=>ga(r(u).values))):0};return n.forEach(u=>{const c=r(u),f=Fe({},u,l);i||(f.$max=ga(c.values||[])),u[a]=XQ(c,f,o.dep?o:pn(o(f)),s.dep?s:pn(s(f)))}),t.reflow(!0).modifies(a)}});function GQ(e,t){let n;return Me(e)?(n=i=>vo(e(i,t)),n.dep=NA(e)):n=pn(vo(e||"#888")),n}function VQ(e,t){let n;return Me(e)?(n=i=>e(i,t),n.dep=NA(e)):e?n=pn(e):(n=i=>i.$value/i.$max||0,n.dep=!0),n}function NA(e){if(!Me(e))return!1;const t=Ki(fn(e));return t.$x||t.$y||t.$value||t.$max}function XQ(e,t,n,i){const r=e.width,s=e.height,o=e.x1||0,a=e.y1||0,l=e.x2||r,u=e.y2||s,c=e.values,f=c?m=>c[m]:io,d=mo(l-o,u-a),h=d.getContext("2d"),p=h.getImageData(0,0,l-o,u-a),g=p.data;for(let m=a,y=0;m<u;++m){t.$y=m-a;for(let b=o,v=m*r;b<l;++b,y+=4){t.$x=b-o,t.$value=f(b+v);const x=n(t);g[y+0]=x.r,g[y+1]=x.g,g[y+2]=x.b,g[y+3]=~~(255*i(t))}}return h.putImageData(p,0,0),d}function OA(e){I.call(this,null,e),this.modified(!0)}K(OA,I,{transform(e,t){let n=this.value;return!n||e.modified("type")?(this.value=n=ZQ(e.type),Mv.forEach(i=>{e[i]!=null&&RA(n,i,e[i])})):Mv.forEach(i=>{e.modified(i)&&RA(n,i,e[i])}),e.pointRadius!=null&&n.path.pointRadius(e.pointRadius),e.fit&&YQ(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});function YQ(e,t){const n=KQ(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}function ZQ(e){const t=Fv((e||"mercator").toLowerCase());return t||U("Unrecognized projection type: "+e),t()}function RA(e,t,n){Me(e[t])&&e[t](n)}function KQ(e){return e=ee(e),e.length===1?e[0]:{type:Iv,features:e.reduce((t,n)=>t.concat(JQ(n)),[])}}function JQ(e){return e.type===Iv?e.features:ee(e).filter(t=>t!=null).map(t=>t.type===Lv?t:{type:Lv,geometry:t})}const QQ=Object.freeze(Object.defineProperty({__proto__:null,contour:Rv,geojson:zv,geopath:Pv,geopoint:Bv,geoshape:jv,graticule:Uv,heatmap:qv,isocontour:Dv,kde2d:Ov,projection:OA},Symbol.toStringTag,{value:"Module"}));function eee(e,t){var n,i=1;e==null&&(e=0),t==null&&(t=0);function r(){var s,o=n.length,a,l=0,u=0;for(s=0;s<o;++s)a=n[s],l+=a.x,u+=a.y;for(l=(l/o-e)*i,u=(u/o-t)*i,s=0;s<o;++s)a=n[s],a.x-=l,a.y-=u}return r.initialize=function(s){n=s},r.x=function(s){return arguments.length?(e=+s,r):e},r.y=function(s){return arguments.length?(t=+s,r):t},r.strength=function(s){return arguments.length?(i=+s,r):i},r}function tee(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return LA(this.cover(t,n),t,n,e)}function LA(e,t,n,i){if(isNaN(t)||isNaN(n))return e;var r,s=e._root,o={data:i},a=e._x0,l=e._y0,u=e._x1,c=e._y1,f,d,h,p,g,m,y,b;if(!s)return e._root=o,e;for(;s.length;)if((g=t>=(f=(a+u)/2))?a=f:u=f,(m=n>=(d=(l+c)/2))?l=d:c=d,r=s,!(s=s[y=m<<1|g]))return r[y]=o,e;if(h=+e._x.call(null,s.data),p=+e._y.call(null,s.data),t===h&&n===p)return o.next=s,r?r[y]=o:e._root=o,e;do r=r?r[y]=new Array(4):e._root=new Array(4),(g=t>=(f=(a+u)/2))?a=f:u=f,(m=n>=(d=(l+c)/2))?l=d:c=d;while((y=m<<1|g)===(b=(p>=d)<<1|h>=f));return r[b]=s,r[y]=o,e}function nee(e){var t,n,i=e.length,r,s,o=new Array(i),a=new Array(i),l=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(s=+this._y.call(null,t))||(o[n]=r,a[n]=s,r<l&&(l=r),r>c&&(c=r),s<u&&(u=s),s>f&&(f=s));if(l>c||u>f)return this;for(this.cover(l,u).cover(c,f),n=0;n<i;++n)LA(this,o[n],a[n],e[n]);return this}function iee(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,i=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(e))+1,s=(i=Math.floor(t))+1;else{for(var o=r-n||1,a=this._root,l,u;n>e||e>=r||i>t||t>=s;)switch(u=(t<i)<<1|e<n,l=new Array(4),l[u]=a,a=l,o*=2,u){case 0:r=n+o,s=i+o;break;case 1:n=r-o,s=i+o;break;case 2:r=n+o,i=s-o;break;case 3:n=r-o,i=s-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=i,this._x1=r,this._y1=s,this}function ree(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function see(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Rn(e,t,n,i,r){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=r}function oee(e,t,n){var i,r=this._x0,s=this._y0,o,a,l,u,c=this._x1,f=this._y1,d=[],h=this._root,p,g;for(h&&d.push(new Rn(h,r,s,c,f)),n==null?n=1/0:(r=e-n,s=t-n,c=e+n,f=t+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>c||(a=p.y0)>f||(l=p.x1)<r||(u=p.y1)<s))if(h.length){var m=(o+l)/2,y=(a+u)/2;d.push(new Rn(h[3],m,y,l,u),new Rn(h[2],o,y,m,u),new Rn(h[1],m,a,l,y),new Rn(h[0],o,a,m,y)),(g=(t>=y)<<1|e>=m)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var b=e-+this._x.call(null,h.data),v=t-+this._y.call(null,h.data),x=b*b+v*v;if(x<n){var _=Math.sqrt(n=x);r=e-_,s=t-_,c=e+_,f=t+_,i=h.data}}return i}function aee(e){if(isNaN(c=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,i,r,s,o=this._x0,a=this._y0,l=this._x1,u=this._y1,c,f,d,h,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=c>=(d=(o+l)/2))?o=d:l=d,(g=f>=(h=(a+u)/2))?a=h:u=h,t=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(i=t,y=m)}for(;n.data!==e;)if(r=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,r?(s?r.next=s:delete r.next,this):t?(s?t[m]=s:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[y]=n:this._root=n),this):(this._root=s,this)}function lee(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function uee(){return this._root}function cee(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function fee(e){var t=[],n,i=this._root,r,s,o,a,l;for(i&&t.push(new Rn(i,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(i=n.node,s=n.x0,o=n.y0,a=n.x1,l=n.y1)&&i.length){var u=(s+a)/2,c=(o+l)/2;(r=i[3])&&t.push(new Rn(r,u,c,a,l)),(r=i[2])&&t.push(new Rn(r,s,c,u,l)),(r=i[1])&&t.push(new Rn(r,u,o,a,c)),(r=i[0])&&t.push(new Rn(r,s,o,u,c))}return this}function dee(e){var t=[],n=[],i;for(this._root&&t.push(new Rn(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var r=i.node;if(r.length){var s,o=i.x0,a=i.y0,l=i.x1,u=i.y1,c=(o+l)/2,f=(a+u)/2;(s=r[0])&&t.push(new Rn(s,o,a,c,f)),(s=r[1])&&t.push(new Rn(s,c,a,l,f)),(s=r[2])&&t.push(new Rn(s,o,f,c,u)),(s=r[3])&&t.push(new Rn(s,c,f,l,u))}n.push(i)}for(;i=n.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function hee(e){return e[0]}function pee(e){return arguments.length?(this._x=e,this):this._x}function gee(e){return e[1]}function mee(e){return arguments.length?(this._y=e,this):this._y}function Wv(e,t,n){var i=new Hv(t??hee,n??gee,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Hv(e,t,n,i,r,s){this._x=e,this._y=t,this._x0=n,this._y0=i,this._x1=r,this._y1=s,this._root=void 0}function IA(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ln=Wv.prototype=Hv.prototype;Ln.copy=function(){var e=new Hv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,i;if(!t)return e;if(!t.length)return e._root=IA(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var r=0;r<4;++r)(i=t.source[r])&&(i.length?n.push({source:i,target:t.target[r]=new Array(4)}):t.target[r]=IA(i));return e},Ln.add=tee,Ln.addAll=nee,Ln.cover=iee,Ln.data=ree,Ln.extent=see,Ln.find=oee,Ln.remove=aee,Ln.removeAll=lee,Ln.root=uee,Ln.size=cee,Ln.visit=fee,Ln.visitAfter=dee,Ln.x=pee,Ln.y=mee;function In(e){return function(){return e}}function zo(e){return(e()-.5)*1e-6}function yee(e){return e.x+e.vx}function bee(e){return e.y+e.vy}function vee(e){var t,n,i,r=1,s=1;typeof e!="function"&&(e=In(e==null?1:+e));function o(){for(var u,c=t.length,f,d,h,p,g,m,y=0;y<s;++y)for(f=Wv(t,yee,bee).visitAfter(a),u=0;u<c;++u)d=t[u],g=n[d.index],m=g*g,h=d.x+d.vx,p=d.y+d.vy,f.visit(b);function b(v,x,_,k,w){var $=v.data,S=v.r,E=g+S;if($){if($.index>d.index){var A=h-$.x-$.vx,R=p-$.y-$.vy,C=A*A+R*R;C<E*E&&(A===0&&(A=zo(i),C+=A*A),R===0&&(R=zo(i),C+=R*R),C=(E-(C=Math.sqrt(C)))/C*r,d.vx+=(A*=C)*(E=(S*=S)/(m+S)),d.vy+=(R*=C)*E,$.vx-=A*(E=1-E),$.vy-=R*E)}return}return x>h+E||k<h-E||_>p+E||w<p-E}}function a(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function l(){if(t){var u,c=t.length,f;for(n=new Array(c),u=0;u<c;++u)f=t[u],n[f.index]=+e(f,u,t)}}return o.initialize=function(u,c){t=u,i=c,l()},o.iterations=function(u){return arguments.length?(s=+u,o):s},o.strength=function(u){return arguments.length?(r=+u,o):r},o.radius=function(u){return arguments.length?(e=typeof u=="function"?u:In(+u),l(),o):e},o}function xee(e){return e.index}function zA(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function _ee(e){var t=xee,n=f,i,r=In(30),s,o,a,l,u,c=1;e==null&&(e=[]);function f(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function d(m){for(var y=0,b=e.length;y<c;++y)for(var v=0,x,_,k,w,$,S,E;v<b;++v)x=e[v],_=x.source,k=x.target,w=k.x+k.vx-_.x-_.vx||zo(u),$=k.y+k.vy-_.y-_.vy||zo(u),S=Math.sqrt(w*w+$*$),S=(S-s[v])/S*m*i[v],w*=S,$*=S,k.vx-=w*(E=l[v]),k.vy-=$*E,_.vx+=w*(E=1-E),_.vy+=$*E}function h(){if(o){var m,y=o.length,b=e.length,v=new Map(o.map((_,k)=>[t(_,k,o),_])),x;for(m=0,a=new Array(y);m<b;++m)x=e[m],x.index=m,typeof x.source!="object"&&(x.source=zA(v,x.source)),typeof x.target!="object"&&(x.target=zA(v,x.target)),a[x.source.index]=(a[x.source.index]||0)+1,a[x.target.index]=(a[x.target.index]||0)+1;for(m=0,l=new Array(b);m<b;++m)x=e[m],l[m]=a[x.source.index]/(a[x.source.index]+a[x.target.index]);i=new Array(b),p(),s=new Array(b),g()}}function p(){if(o)for(var m=0,y=e.length;m<y;++m)i[m]=+n(e[m],m,e)}function g(){if(o)for(var m=0,y=e.length;m<y;++m)s[m]=+r(e[m],m,e)}return d.initialize=function(m,y){o=m,u=y,h()},d.links=function(m){return arguments.length?(e=m,h(),d):e},d.id=function(m){return arguments.length?(t=m,d):t},d.iterations=function(m){return arguments.length?(c=+m,d):c},d.strength=function(m){return arguments.length?(n=typeof m=="function"?m:In(+m),p(),d):n},d.distance=function(m){return arguments.length?(r=typeof m=="function"?m:In(+m),g(),d):r},d}var wee={value:()=>{}};function PA(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new d0(n)}function d0(e){this._=e}function kee(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}d0.prototype=PA.prototype={constructor:d0,on:function(e,t){var n=this._,i=kee(e+"",n),r,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((r=(e=i[s]).type)&&(r=$ee(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(r=(e=i[s]).type)n[r]=BA(n[r],e.name,t);else if(t==null)for(r in n)n[r]=BA(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new d0(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,r=s.length;i<r;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,s=i.length;r<s;++r)i[r].value.apply(t,n)}};function $ee(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function BA(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=wee,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ou=0,Qf=0,ed=0,jA=1e3,h0,td,p0=0,Ua=0,g0=0,nd=typeof performance=="object"&&performance.now?performance:Date,UA=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gv(){return Ua||(UA(Eee),Ua=nd.now()+g0)}function Eee(){Ua=0}function m0(){this._call=this._time=this._next=null}m0.prototype=qA.prototype={constructor:m0,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Gv():+n)+(t==null?0:+t),!this._next&&td!==this&&(td?td._next=this:h0=this,td=this),this._call=e,this._time=n,Vv()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vv())}};function qA(e,t,n){var i=new m0;return i.restart(e,t,n),i}function Cee(){Gv(),++Ou;for(var e=h0,t;e;)(t=Ua-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ou}function WA(){Ua=(p0=nd.now())+g0,Ou=Qf=0;try{Cee()}finally{Ou=0,Aee(),Ua=0}}function See(){var e=nd.now(),t=e-p0;t>jA&&(g0-=t,p0=e)}function Aee(){for(var e,t=h0,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:h0=n);td=e,Vv(i)}function Vv(e){if(!Ou){Qf&&(Qf=clearTimeout(Qf));var t=e-Ua;t>24?(e<1/0&&(Qf=setTimeout(WA,e-nd.now()-g0)),ed&&(ed=clearInterval(ed))):(ed||(p0=nd.now(),ed=setInterval(See,jA)),Ou=1,UA(WA))}}function Tee(e,t,n){var i=new m0,r=t;return t==null?(i.restart(e,t,n),i):(i._restart=i.restart,i.restart=function(s,o,a){o=+o,a=a==null?Gv():+a,i._restart(function l(u){u+=r,i._restart(l,r+=o,a),s(u)},o,a)},i.restart(e,t,n),i)}const Mee=1664525,Fee=1013904223,HA=4294967296;function Dee(){let e=1;return()=>(e=(Mee*e+Fee)%HA)/HA}function Nee(e){return e.x}function Oee(e){return e.y}var Ree=10,Lee=Math.PI*(3-Math.sqrt(5));function Iee(e){var t,n=1,i=.001,r=1-Math.pow(i,1/300),s=0,o=.6,a=new Map,l=qA(f),u=PA("tick","end"),c=Dee();e==null&&(e=[]);function f(){d(),u.call("tick",t),n<i&&(l.stop(),u.call("end",t))}function d(g){var m,y=e.length,b;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(s-n)*r,a.forEach(function(x){x(n)}),m=0;m<y;++m)b=e[m],b.fx==null?b.x+=b.vx*=o:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=o:(b.y=b.fy,b.vy=0);return t}function h(){for(var g=0,m=e.length,y;g<m;++g){if(y=e[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var b=Ree*Math.sqrt(.5+g),v=g*Lee;y.x=b*Math.cos(v),y.y=b*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(e,c),g}return h(),t={tick:d,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(g){return arguments.length?(e=g,h(),a.forEach(p),t):e},alpha:function(g){return arguments.length?(n=+g,t):n},alphaMin:function(g){return arguments.length?(i=+g,t):i},alphaDecay:function(g){return arguments.length?(r=+g,t):+r},alphaTarget:function(g){return arguments.length?(s=+g,t):s},velocityDecay:function(g){return arguments.length?(o=1-g,t):1-o},randomSource:function(g){return arguments.length?(c=g,a.forEach(p),t):c},force:function(g,m){return arguments.length>1?(m==null?a.delete(g):a.set(g,p(m)),t):a.get(g)},find:function(g,m,y){var b=0,v=e.length,x,_,k,w,$;for(y==null?y=1/0:y*=y,b=0;b<v;++b)w=e[b],x=g-w.x,_=m-w.y,k=x*x+_*_,k<y&&($=w,y=k);return $},on:function(g,m){return arguments.length>1?(u.on(g,m),t):u.on(g)}}}function zee(){var e,t,n,i,r=In(-30),s,o=1,a=1/0,l=.81;function u(h){var p,g=e.length,m=Wv(e,Nee,Oee).visitAfter(f);for(i=h,p=0;p<g;++p)t=e[p],m.visit(d)}function c(){if(e){var h,p=e.length,g;for(s=new Array(p),h=0;h<p;++h)g=e[h],s[g.index]=+r(g,h,e)}}function f(h){var p=0,g,m,y=0,b,v,x;if(h.length){for(b=v=x=0;x<4;++x)(g=h[x])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,b+=m*g.x,v+=m*g.y);h.x=b/y,h.y=v/y}else{g=h,g.x=g.data.x,g.y=g.data.y;do p+=s[g.data.index];while(g=g.next)}h.value=p}function d(h,p,g,m){if(!h.value)return!0;var y=h.x-t.x,b=h.y-t.y,v=m-p,x=y*y+b*b;if(v*v/l<x)return x<a&&(y===0&&(y=zo(n),x+=y*y),b===0&&(b=zo(n),x+=b*b),x<o&&(x=Math.sqrt(o*x)),t.vx+=y*h.value*i/x,t.vy+=b*h.value*i/x),!0;if(h.length||x>=a)return;(h.data!==t||h.next)&&(y===0&&(y=zo(n),x+=y*y),b===0&&(b=zo(n),x+=b*b),x<o&&(x=Math.sqrt(o*x)));do h.data!==t&&(v=s[h.data.index]*i/x,t.vx+=y*v,t.vy+=b*v);while(h=h.next)}return u.initialize=function(h,p){e=h,n=p,c()},u.strength=function(h){return arguments.length?(r=typeof h=="function"?h:In(+h),c(),u):r},u.distanceMin=function(h){return arguments.length?(o=h*h,u):Math.sqrt(o)},u.distanceMax=function(h){return arguments.length?(a=h*h,u):Math.sqrt(a)},u.theta=function(h){return arguments.length?(l=h*h,u):Math.sqrt(l)},u}function Pee(e){var t=In(.1),n,i,r;typeof e!="function"&&(e=In(e==null?0:+e));function s(a){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(r[l]-c.x)*i[l]*a}function o(){if(n){var a,l=n.length;for(i=new Array(l),r=new Array(l),a=0;a<l;++a)i[a]=isNaN(r[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:In(+a),o(),s):t},s.x=function(a){return arguments.length?(e=typeof a=="function"?a:In(+a),o(),s):e},s}function Bee(e){var t=In(.1),n,i,r;typeof e!="function"&&(e=In(e==null?0:+e));function s(a){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(r[l]-c.y)*i[l]*a}function o(){if(n){var a,l=n.length;for(i=new Array(l),r=new Array(l),a=0;a<l;++a)i[a]=isNaN(r[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:In(+a),o(),s):t},s.y=function(a){return arguments.length?(e=typeof a=="function"?a:In(+a),o(),s):e},s}const GA={center:eee,collide:vee,nbody:zee,link:_ee,x:Pee,y:Bee},id="forces",Xv=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],jee=["static","iterations"],VA=["x","y","vx","vy"];function Yv(e){I.call(this,null,e)}Yv.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:VA}]},K(Yv,I,{transform(e,t){var n=this.value,i=t.changed(t.ADD_REM),r=e.modified(Xv),s=e.iterations||300;if(n?(i&&(t.modifies("index"),n.nodes(t.source)),(r||t.changed(t.MOD))&&XA(n,e,0,t)):(this.value=n=qee(t.source,e),n.on("tick",Uee(t.dataflow,this)),e.static||(i=!0,n.tick()),t.modifies("index")),r||i||e.modified(jee)||t.changed()&&e.restart){if(n.alpha(Math.max(n.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/s)),e.static)for(n.stop();--s>=0;)n.tick();else if(n.stopped()&&n.restart(),!i)return t.StopPropagation}return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let a=this._argops,l=0,u=a.length,c;l<u;++l)if(c=a[l],!(c.name!==id||c.op._argval.force!=="link")){for(var i=c.op._argops,r=0,s=i.length,o;r<s;++r)if(i[r].name==="links"&&(o=i[r].op.source)){n.pulse(o,n.changeset().reflow());break}}return t.reflow(e.modified()).modifies(VA)}});function Uee(e,t){return()=>e.touch(t).run()}function qee(e,t){const n=Iee(e),i=n.stop,r=n.restart;let s=!1;return n.stopped=()=>s,n.restart=()=>(s=!1,r()),n.stop=()=>(s=!0,i()),XA(n,t,!0).on("end",()=>s=!0)}function XA(e,t,n,i){var r=ee(t.forces),s,o,a,l;for(s=0,o=Xv.length;s<o;++s)a=Xv[s],a!==id&&t.modified(a)&&e[a](t[a]);for(s=0,o=r.length;s<o;++s)l=id+s,a=n||t.modified(id,s)?Hee(r[s]):i&&Wee(r[s],i)?e.force(l):null,a&&e.force(l,a);for(o=e.numForces||0;s<o;++s)e.force(id+s,null);return e.numForces=r.length,e}function Wee(e,t){var n,i;for(n in e)if(Me(i=e[n])&&t.modified(fn(i)))return 1;return 0}function Hee(e){var t,n;pe(GA,e.force)||U("Unrecognized force: "+e.force),t=GA[e.force]();for(n in e)Me(t[n])&&Gee(t[n],e[n],e);return t}function Gee(e,t,n){e(Me(t)?i=>t(i,n):t)}const Vee=Object.freeze(Object.defineProperty({__proto__:null,force:Yv},Symbol.toStringTag,{value:"Module"}));function Xee(e,t){return e.parent===t.parent?1:2}function Yee(e){return e.reduce(Zee,0)/e.length}function Zee(e,t){return e+t.x}function Kee(e){return 1+e.reduce(Jee,0)}function Jee(e,t){return Math.max(e,t.y)}function Qee(e){for(var t;t=e.children;)e=t[0];return e}function ete(e){for(var t;t=e.children;)e=t[t.length-1];return e}function tte(){var e=Xee,t=1,n=1,i=!1;function r(s){var o,a=0;s.eachAfter(function(d){var h=d.children;h?(d.x=Yee(h),d.y=Kee(h)):(d.x=o?a+=e(d,o):0,d.y=0,o=d)});var l=Qee(s),u=ete(s),c=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return s.eachAfter(i?function(d){d.x=(d.x-s.x)*t,d.y=(s.y-d.y)*n}:function(d){d.x=(d.x-c)/(f-c)*t,d.y=(1-(s.y?d.y/s.y:1))*n})}return r.separation=function(s){return arguments.length?(e=s,r):e},r.size=function(s){return arguments.length?(i=!1,t=+s[0],n=+s[1],r):i?null:[t,n]},r.nodeSize=function(s){return arguments.length?(i=!0,t=+s[0],n=+s[1],r):i?[t,n]:null},r}function nte(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function ite(){return this.eachAfter(nte)}function rte(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function ste(e,t){for(var n=this,i=[n],r,s,o=-1;n=i.pop();)if(e.call(t,n,++o,this),r=n.children)for(s=r.length-1;s>=0;--s)i.push(r[s]);return this}function ote(e,t){for(var n=this,i=[n],r=[],s,o,a,l=-1;n=i.pop();)if(r.push(n),s=n.children)for(o=0,a=s.length;o<a;++o)i.push(s[o]);for(;n=r.pop();)e.call(t,n,++l,this);return this}function ate(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function lte(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function ute(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function cte(e){for(var t=this,n=fte(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function fte(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function dte(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function hte(){return Array.from(this)}function pte(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function gte(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*mte(){var e=this,t,n=[e],i,r,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,s=i.length;r<s;++r)n.push(i[r]);while(n.length)}function Zv(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=vte)):t===void 0&&(t=bte);for(var n=new Ru(e),i,r=[n],s,o,a,l;i=r.pop();)if((o=t(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,a=l-1;a>=0;--a)r.push(s=o[a]=new Ru(o[a])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(YA)}function yte(){return Zv(this).eachBefore(xte)}function bte(e){return e.children}function vte(e){return Array.isArray(e)?e[1]:null}function xte(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function YA(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ru(e){this.data=e,this.depth=this.height=0,this.parent=null}Ru.prototype=Zv.prototype={constructor:Ru,count:ite,each:rte,eachAfter:ote,eachBefore:ste,find:ate,sum:lte,sort:ute,path:cte,ancestors:dte,descendants:hte,leaves:pte,links:gte,copy:yte,[Symbol.iterator]:mte};function y0(e){return e==null?null:ZA(e)}function ZA(e){if(typeof e!="function")throw new Error;return e}function qa(){return 0}function Lu(e){return function(){return e}}const _te=1664525,wte=1013904223,KA=4294967296;function kte(){let e=1;return()=>(e=(_te*e+wte)%KA)/KA}function $te(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ete(e,t){let n=e.length,i,r;for(;n;)r=t()*n--|0,i=e[n],e[n]=e[r],e[r]=i;return e}function Cte(e,t){for(var n=0,i=(e=Ete(Array.from(e),t)).length,r=[],s,o;n<i;)s=e[n],o&&JA(o,s)?++n:(o=Ate(r=Ste(r,s)),n=0);return o}function Ste(e,t){var n,i;if(Kv(t,e))return[t];for(n=0;n<e.length;++n)if(b0(t,e[n])&&Kv(rd(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(i=n+1;i<e.length;++i)if(b0(rd(e[n],e[i]),t)&&b0(rd(e[n],t),e[i])&&b0(rd(e[i],t),e[n])&&Kv(QA(e[n],e[i],t),e))return[e[n],e[i],t];throw new Error}function b0(e,t){var n=e.r-t.r,i=t.x-e.x,r=t.y-e.y;return n<0||n*n<i*i+r*r}function JA(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Kv(e,t){for(var n=0;n<t.length;++n)if(!JA(e,t[n]))return!1;return!0}function Ate(e){switch(e.length){case 1:return Tte(e[0]);case 2:return rd(e[0],e[1]);case 3:return QA(e[0],e[1],e[2])}}function Tte(e){return{x:e.x,y:e.y,r:e.r}}function rd(e,t){var n=e.x,i=e.y,r=e.r,s=t.x,o=t.y,a=t.r,l=s-n,u=o-i,c=a-r,f=Math.sqrt(l*l+u*u);return{x:(n+s+l/f*c)/2,y:(i+o+u/f*c)/2,r:(f+r+a)/2}}function QA(e,t,n){var i=e.x,r=e.y,s=e.r,o=t.x,a=t.y,l=t.r,u=n.x,c=n.y,f=n.r,d=i-o,h=i-u,p=r-a,g=r-c,m=l-s,y=f-s,b=i*i+r*r-s*s,v=b-o*o-a*a+l*l,x=b-u*u-c*c+f*f,_=h*p-d*g,k=(p*x-g*v)/(_*2)-i,w=(g*m-p*y)/_,$=(h*v-d*x)/(_*2)-r,S=(d*y-h*m)/_,E=w*w+S*S-1,A=2*(s+k*w+$*S),R=k*k+$*$-s*s,C=-(Math.abs(E)>1e-6?(A+Math.sqrt(A*A-4*E*R))/(2*E):R/A);return{x:i+k+w*C,y:r+$+S*C,r:C}}function eT(e,t,n){var i=e.x-t.x,r,s,o=e.y-t.y,a,l,u=i*i+o*o;u?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(r=(u+l-s)/(2*u),a=Math.sqrt(Math.max(0,l/u-r*r)),n.x=e.x-r*i-a*o,n.y=e.y-r*o+a*i):(r=(u+s-l)/(2*u),a=Math.sqrt(Math.max(0,s/u-r*r)),n.x=t.x+r*i-a*o,n.y=t.y+r*o+a*i)):(n.x=t.x+n.r,n.y=t.y)}function tT(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function nT(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,s=(t.y*n.r+n.y*t.r)/i;return r*r+s*s}function v0(e){this._=e,this.next=null,this.previous=null}function Mte(e,t){if(!(s=(e=$te(e)).length))return 0;var n,i,r,s,o,a,l,u,c,f,d;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(s>2))return n.r+i.r;eT(i,n,r=e[2]),n=new v0(n),i=new v0(i),r=new v0(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;e:for(l=3;l<s;++l){eT(n._,i._,r=e[l]),r=new v0(r),u=i.next,c=n.previous,f=i._.r,d=n._.r;do if(f<=d){if(tT(u._,r._)){i=u,n.next=i,i.previous=n,--l;continue e}f+=u._.r,u=u.next}else{if(tT(c._,r._)){n=c,n.next=i,i.previous=n,--l;continue e}d+=c._.r,c=c.previous}while(u!==c.next);for(r.previous=n,r.next=i,n.next=i.previous=i=r,o=nT(n);(r=r.next)!==i;)(a=nT(r))<o&&(n=r,o=a);i=n.next}for(n=[i._],r=i;(r=r.next)!==i;)n.push(r._);for(r=Cte(n,t),l=0;l<s;++l)n=e[l],n.x-=r.x,n.y-=r.y;return r.r}function Fte(e){return Math.sqrt(e.value)}function Dte(){var e=null,t=1,n=1,i=qa;function r(s){const o=kte();return s.x=t/2,s.y=n/2,e?s.eachBefore(iT(e)).eachAfter(Jv(i,.5,o)).eachBefore(rT(1)):s.eachBefore(iT(Fte)).eachAfter(Jv(qa,1,o)).eachAfter(Jv(i,s.r/Math.min(t,n),o)).eachBefore(rT(Math.min(t,n)/(2*s.r))),s}return r.radius=function(s){return arguments.length?(e=y0(s),r):e},r.size=function(s){return arguments.length?(t=+s[0],n=+s[1],r):[t,n]},r.padding=function(s){return arguments.length?(i=typeof s=="function"?s:Lu(+s),r):i},r}function iT(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Jv(e,t,n){return function(i){if(r=i.children){var r,s,o=r.length,a=e(i)*t||0,l;if(a)for(s=0;s<o;++s)r[s].r+=a;if(l=Mte(r,n),a)for(s=0;s<o;++s)r[s].r-=a;i.r=l+a}}}function rT(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function sT(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function sd(e,t,n,i,r){for(var s=e.children,o,a=-1,l=s.length,u=e.value&&(i-t)/e.value;++a<l;)o=s[a],o.y0=n,o.y1=r,o.x0=t,o.x1=t+=o.value*u}function Nte(){var e=1,t=1,n=0,i=!1;function r(o){var a=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/a,o.eachBefore(s(t,a)),i&&o.eachBefore(sT),o}function s(o,a){return function(l){l.children&&sd(l,l.x0,o*(l.depth+1)/a,l.x1,o*(l.depth+2)/a);var u=l.x0,c=l.y0,f=l.x1-n,d=l.y1-n;f<u&&(u=f=(u+f)/2),d<c&&(c=d=(c+d)/2),l.x0=u,l.y0=c,l.x1=f,l.y1=d}}return r.round=function(o){return arguments.length?(i=!!o,r):i},r.size=function(o){return arguments.length?(e=+o[0],t=+o[1],r):[e,t]},r.padding=function(o){return arguments.length?(n=+o,r):n},r}var Ote={depth:-1},oT={},Qv={};function Rte(e){return e.id}function Lte(e){return e.parentId}function aT(){var e=Rte,t=Lte,n;function i(r){var s=Array.from(r),o=e,a=t,l,u,c,f,d,h,p,g,m=new Map;if(n!=null){const y=s.map((x,_)=>Ite(n(x,_,r))),b=y.map(lT),v=new Set(y).add("");for(const x of b)v.has(x)||(v.add(x),y.push(x),b.push(lT(x)),s.push(Qv));o=(x,_)=>y[_],a=(x,_)=>b[_]}for(c=0,l=s.length;c<l;++c)u=s[c],h=s[c]=new Ru(u),(p=o(u,c,r))!=null&&(p+="")&&(g=h.id=p,m.set(g,m.has(g)?oT:h)),(p=a(u,c,r))!=null&&(p+="")&&(h.parent=p);for(c=0;c<l;++c)if(h=s[c],p=h.parent){if(d=m.get(p),!d)throw new Error("missing: "+p);if(d===oT)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Qv&&f.children.length===1;)f=f.children[0],--l;for(let y=s.length-1;y>=0&&(h=s[y],h.data===Qv);--y)h.data=null}if(f.parent=Ote,f.eachBefore(function(y){y.depth=y.parent.depth+1,--l}).eachBefore(YA),f.parent=null,l>0)throw new Error("cycle");return f}return i.id=function(r){return arguments.length?(e=y0(r),i):e},i.parentId=function(r){return arguments.length?(t=y0(r),i):t},i.path=function(r){return arguments.length?(n=y0(r),i):n},i}function Ite(e){e=`${e}`;let t=e.length;return ex(e,t-1)&&!ex(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function lT(e){let t=e.length;if(t<2)return"";for(;--t>1&&!ex(e,t););return e.slice(0,t)}function ex(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function zte(e,t){return e.parent===t.parent?1:2}function tx(e){var t=e.children;return t?t[0]:e.t}function nx(e){var t=e.children;return t?t[t.length-1]:e.t}function Pte(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function Bte(e){for(var t=0,n=0,i=e.children,r=i.length,s;--r>=0;)s=i[r],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function jte(e,t,n){return e.a.parent===t.parent?e.a:n}function x0(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}x0.prototype=Object.create(Ru.prototype);function Ute(e){for(var t=new x0(e,0),n,i=[t],r,s,o,a;n=i.pop();)if(s=n._.children)for(n.children=new Array(a=s.length),o=a-1;o>=0;--o)i.push(r=n.children[o]=new x0(s[o],o)),r.parent=n;return(t.parent=new x0(null,0)).children=[t],t}function qte(){var e=zte,t=1,n=1,i=null;function r(u){var c=Ute(u);if(c.eachAfter(s),c.parent.m=-c.z,c.eachBefore(o),i)u.eachBefore(l);else{var f=u,d=u,h=u;u.eachBefore(function(b){b.x<f.x&&(f=b),b.x>d.x&&(d=b),b.depth>h.depth&&(h=b)});var p=f===d?1:e(f,d)/2,g=p-f.x,m=t/(d.x+p+g),y=n/(h.depth||1);u.eachBefore(function(b){b.x=(b.x+g)*m,b.y=b.depth*y})}return u}function s(u){var c=u.children,f=u.parent.children,d=u.i?f[u.i-1]:null;if(c){Bte(u);var h=(c[0].z+c[c.length-1].z)/2;d?(u.z=d.z+e(u._,d._),u.m=u.z-h):u.z=h}else d&&(u.z=d.z+e(u._,d._));u.parent.A=a(u,d,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function a(u,c,f){if(c){for(var d=u,h=u,p=c,g=d.parent.children[0],m=d.m,y=h.m,b=p.m,v=g.m,x;p=nx(p),d=tx(d),p&&d;)g=tx(g),h=nx(h),h.a=u,x=p.z+b-d.z-m+e(p._,d._),x>0&&(Pte(jte(p,u,f),u,x),m+=x,y+=x),b+=p.m,m+=d.m,v+=g.m,y+=h.m;p&&!nx(h)&&(h.t=p,h.m+=b-y),d&&!tx(g)&&(g.t=d,g.m+=m-v,f=u)}return f}function l(u){u.x*=t,u.y=u.depth*n}return r.separation=function(u){return arguments.length?(e=u,r):e},r.size=function(u){return arguments.length?(i=!1,t=+u[0],n=+u[1],r):i?null:[t,n]},r.nodeSize=function(u){return arguments.length?(i=!0,t=+u[0],n=+u[1],r):i?[t,n]:null},r}function _0(e,t,n,i,r){for(var s=e.children,o,a=-1,l=s.length,u=e.value&&(r-n)/e.value;++a<l;)o=s[a],o.x0=t,o.x1=i,o.y0=n,o.y1=n+=o.value*u}var uT=(1+Math.sqrt(5))/2;function cT(e,t,n,i,r,s){for(var o=[],a=t.children,l,u,c=0,f=0,d=a.length,h,p,g=t.value,m,y,b,v,x,_,k;c<d;){h=r-n,p=s-i;do m=a[f++].value;while(!m&&f<d);for(y=b=m,_=Math.max(p/h,h/p)/(g*e),k=m*m*_,x=Math.max(b/k,k/y);f<d;++f){if(m+=u=a[f].value,u<y&&(y=u),u>b&&(b=u),k=m*m*_,v=Math.max(b/k,k/y),v>x){m-=u;break}x=v}o.push(l={value:m,dice:h<p,children:a.slice(c,f)}),l.dice?sd(l,n,i,r,g?i+=p*m/g:s):_0(l,n,i,g?n+=h*m/g:r,s),g-=m,c=f}return o}const fT=function e(t){function n(i,r,s,o,a){cT(t,i,r,s,o,a)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(uT);function Wte(){var e=fT,t=!1,n=1,i=1,r=[0],s=qa,o=qa,a=qa,l=qa,u=qa;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=i,d.eachBefore(f),r=[0],t&&d.eachBefore(sT),d}function f(d){var h=r[d.depth],p=d.x0+h,g=d.y0+h,m=d.x1-h,y=d.y1-h;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),d.x0=p,d.y0=g,d.x1=m,d.y1=y,d.children&&(h=r[d.depth+1]=s(d)/2,p+=u(d)-h,g+=o(d)-h,m-=a(d)-h,y-=l(d)-h,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),e(d,p,g,m,y))}return c.round=function(d){return arguments.length?(t=!!d,c):t},c.size=function(d){return arguments.length?(n=+d[0],i=+d[1],c):[n,i]},c.tile=function(d){return arguments.length?(e=ZA(d),c):e},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(s=typeof d=="function"?d:Lu(+d),c):s},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:Lu(+d),c):o},c.paddingRight=function(d){return arguments.length?(a=typeof d=="function"?d:Lu(+d),c):a},c.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:Lu(+d),c):l},c.paddingLeft=function(d){return arguments.length?(u=typeof d=="function"?d:Lu(+d),c):u},c}function Hte(e,t,n,i,r){var s=e.children,o,a=s.length,l,u=new Array(a+1);for(u[0]=l=o=0;o<a;++o)u[o+1]=l+=s[o].value;c(0,a,e.value,t,n,i,r);function c(f,d,h,p,g,m,y){if(f>=d-1){var b=s[f];b.x0=p,b.y0=g,b.x1=m,b.y1=y;return}for(var v=u[f],x=h/2+v,_=f+1,k=d-1;_<k;){var w=_+k>>>1;u[w]<x?_=w+1:k=w}x-u[_-1]<u[_]-x&&f+1<_&&--_;var $=u[_]-v,S=h-$;if(m-p>y-g){var E=h?(p*S+m*$)/h:m;c(f,_,$,p,g,E,y),c(_,d,S,E,g,m,y)}else{var A=h?(g*S+y*$)/h:y;c(f,_,$,p,g,m,A),c(_,d,S,p,A,m,y)}}}function Gte(e,t,n,i,r){(e.depth&1?_0:sd)(e,t,n,i,r)}const Vte=function e(t){function n(i,r,s,o,a){if((l=i._squarify)&&l.ratio===t)for(var l,u,c,f,d=-1,h,p=l.length,g=i.value;++d<p;){for(u=l[d],c=u.children,f=u.value=0,h=c.length;f<h;++f)u.value+=c[f].value;u.dice?sd(u,r,s,o,g?s+=(a-s)*u.value/g:a):_0(u,r,s,g?r+=(o-r)*u.value/g:o,a),g-=u.value}else i._squarify=l=cT(t,i,r,s,o,a),l.ratio=t}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(uT);function ix(e,t,n){const i={};return e.each(r=>{const s=r.data;n(s)&&(i[t(s)]=r)}),e.lookup=i,e}function rx(e){I.call(this,null,e)}rx.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const Xte=e=>e.values;K(rx,I,{transform(e,t){t.source||U("Nest transform requires an upstream data source.");var n=e.generate,i=e.modified(),r=t.clone(),s=this.value;return(!s||i||t.changed())&&(s&&s.each(o=>{o.children&&ip(o.data)&&r.rem.push(o.data)}),this.value=s=Zv({values:ee(e.keys).reduce((o,a)=>(o.key(a),o),Yte()).entries(r.source)},Xte),n&&s.each(o=>{o.children&&(o=et(o.data),r.add.push(o),r.source.push(o))}),ix(s,ge,ge)),r.source.root=s,r}});function Yte(){const e=[],t={entries:r=>i(n(r,0),0),key:r=>(e.push(r),t)};function n(r,s){if(s>=e.length)return r;const o=r.length,a=e[s++],l={},u={};let c=-1,f,d,h;for(;++c<o;)f=a(d=r[c])+"",(h=l[f])?h.push(d):l[f]=[d];for(f in l)u[f]=n(l[f],s);return u}function i(r,s){if(++s>e.length)return r;const o=[];for(const a in r)o.push({key:a,values:i(r[a],s)});return o}return t}function Os(e){I.call(this,null,e)}const Zte=(e,t)=>e.parent===t.parent?1:2;K(Os,I,{transform(e,t){(!t.source||!t.source.root)&&U(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),i=this.fields,r=t.source.root,s=e.as||i;e.field?r.sum(e.field):r.count(),e.sort&&r.sort(xa(e.sort,o=>o.data)),Kte(n,this.params,e),n.separation&&n.separation(e.separation!==!1?Zte:ql);try{this.value=n(r)}catch(o){U(o)}return r.each(o=>Jte(o,i,s)),t.reflow(e.modified()).modifies(s).modifies("leaf")}});function Kte(e,t,n){for(let i,r=0,s=t.length;r<s;++r)i=t[r],i in n&&e[i](n[i])}function Jte(e,t,n){const i=e.data,r=t.length-1;for(let s=0;s<r;++s)i[n[s]]=e[t[s]];i[n[r]]=e.children?e.children.length:0}const sx=["x","y","r","depth","children"];function ox(e){Os.call(this,e)}ox.Definition={type:"Pack",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:sx.length,default:sx}]},K(ox,Os,{layout:Dte,params:["radius","size","padding"],fields:sx});const ax=["x0","y0","x1","y1","depth","children"];function lx(e){Os.call(this,e)}lx.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:ax.length,default:ax}]},K(lx,Os,{layout:Nte,params:["size","round","padding"],fields:ax});function ux(e){I.call(this,null,e)}ux.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},K(ux,I,{transform(e,t){t.source||U("Stratify transform requires an upstream data source.");let n=this.value;const i=e.modified(),r=t.fork(t.ALL).materialize(t.SOURCE),s=!n||i||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return r.source=r.source.slice(),s&&(n=r.source.length?ix(aT().id(e.key).parentId(e.parentKey)(r.source),e.key,Ti):ix(aT()([{}]),e.key,e.key)),r.source.root=this.value=n,r}});const dT={tidy:qte,cluster:tte},cx=["x","y","depth","children"];function fx(e){Os.call(this,e)}fx.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:cx.length,default:cx}]},K(fx,Os,{layout(e){const t=e||"tidy";if(pe(dT,t))return dT[t]();U("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:cx});function dx(e){I.call(this,[],e)}dx.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},K(dx,I,{transform(e,t){const n=this.value,i=t.source&&t.source.root,r=t.fork(t.NO_SOURCE),s={};return i||U("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(r.rem=n,t.visit(t.SOURCE,o=>s[ge(o)]=1),i.each(o=>{const a=o.data,l=o.parent&&o.parent.data;l&&s[ge(a)]&&s[ge(l)]&&r.add.push(et({source:l,target:a}))}),this.value=r.add):t.changed(t.MOD)&&(t.visit(t.MOD,o=>s[ge(o)]=1),n.forEach(o=>{(s[ge(o.source)]||s[ge(o.target)])&&r.mod.push(o)})),r}});const hT={binary:Hte,dice:sd,slice:_0,slicedice:Gte,squarify:fT,resquarify:Vte},hx=["x0","y0","x1","y1","depth","children"];function px(e){Os.call(this,e)}px.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:hx.length,default:hx}]},K(px,Os,{layout(){const e=Wte();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{pe(hT,t)?e.tile(hT[t]):U("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:hx});const Qte=Object.freeze(Object.defineProperty({__proto__:null,nest:rx,pack:ox,partition:lx,stratify:ux,tree:fx,treelinks:dx,treemap:px},Symbol.toStringTag,{value:"Module"})),gx=4278190080;function ene(e,t){const n=e.bitmap();return(t||[]).forEach(i=>n.set(e(i.boundary[0]),e(i.boundary[3]))),[n,void 0]}function tne(e,t,n,i,r){const s=e.width,o=e.height,a=i||r,l=mo(s,o).getContext("2d"),u=mo(s,o).getContext("2d"),c=a&&mo(s,o).getContext("2d");n.forEach($=>w0(l,$,!1)),w0(u,t,!1),a&&w0(c,t,!0);const f=mx(l,s,o),d=mx(u,s,o),h=a&&mx(c,s,o),p=e.bitmap(),g=a&&e.bitmap();let m,y,b,v,x,_,k,w;for(y=0;y<o;++y)for(m=0;m<s;++m)x=y*s+m,_=f[x]&gx,w=d[x]&gx,k=a&&h[x]&gx,(_||k||w)&&(b=e(m),v=e(y),!r&&(_||w)&&p.set(b,v),a&&(_||k)&&g.set(b,v));return[p,g]}function mx(e,t,n){return new Uint32Array(e.getImageData(0,0,t,n).data.buffer)}function w0(e,t,n){if(!t.length)return;const i=t[0].mark.marktype;i==="group"?t.forEach(r=>{r.items.forEach(s=>w0(e,s.items,n))}):yi[i].draw(e,{items:n?t.map(nne):t})}function nne(e){const t=rp(e,{});return t.stroke&&t.strokeOpacity!==0||t.fill&&t.fillOpacity!==0?{...t,strokeOpacity:1,stroke:"#000",fillOpacity:0}:t}const Rs=5,zn=31,od=32,Po=new Uint32Array(od+1),lr=new Uint32Array(od+1);lr[0]=0,Po[0]=~lr[0];for(let e=1;e<=od;++e)lr[e]=lr[e-1]<<1|1,Po[e]=~lr[e];function ine(e,t){const n=new Uint32Array(~~((e*t+od)/od));function i(s,o){n[s]|=o}function r(s,o){n[s]&=o}return{array:n,get:(s,o)=>{const a=o*e+s;return n[a>>>Rs]&1<<(a&zn)},set:(s,o)=>{const a=o*e+s;i(a>>>Rs,1<<(a&zn))},clear:(s,o)=>{const a=o*e+s;r(a>>>Rs,~(1<<(a&zn)))},getRange:(s,o,a,l)=>{let u=l,c,f,d,h;for(;u>=o;--u)if(c=u*e+s,f=u*e+a,d=c>>>Rs,h=f>>>Rs,d===h){if(n[d]&Po[c&zn]&lr[(f&zn)+1])return!0}else{if(n[d]&Po[c&zn]||n[h]&lr[(f&zn)+1])return!0;for(let p=d+1;p<h;++p)if(n[p])return!0}return!1},setRange:(s,o,a,l)=>{let u,c,f,d,h;for(;o<=l;++o)if(u=o*e+s,c=o*e+a,f=u>>>Rs,d=c>>>Rs,f===d)i(f,Po[u&zn]&lr[(c&zn)+1]);else for(i(f,Po[u&zn]),i(d,lr[(c&zn)+1]),h=f+1;h<d;++h)i(h,4294967295)},clearRange:(s,o,a,l)=>{let u,c,f,d,h;for(;o<=l;++o)if(u=o*e+s,c=o*e+a,f=u>>>Rs,d=c>>>Rs,f===d)r(f,lr[u&zn]|Po[(c&zn)+1]);else for(r(f,lr[u&zn]),r(d,Po[(c&zn)+1]),h=f+1;h<d;++h)r(h,0)},outOfBounds:(s,o,a,l)=>s<0||o<0||l>=t||a>=e}}function rne(e,t,n){const i=Math.max(1,Math.sqrt(e*t/1e6)),r=~~((e+2*n+i)/i),s=~~((t+2*n+i)/i),o=a=>~~((a+n)/i);return o.invert=a=>a*i-n,o.bitmap=()=>ine(r,s),o.ratio=i,o.padding=n,o.width=e,o.height=t,o}function sne(e,t,n,i){const r=e.width,s=e.height;return function(o){const a=o.datum.datum.items[i].items,l=a.length,u=o.datum.fontSize,c=mi.width(o.datum,o.datum.text);let f=0,d,h,p,g,m,y,b;for(let v=0;v<l;++v)d=a[v].x,p=a[v].y,h=a[v].x2===void 0?d:a[v].x2,g=a[v].y2===void 0?p:a[v].y2,m=(d+h)/2,y=(p+g)/2,b=Math.abs(h-d+g-p),b>=f&&(f=b,o.x=m,o.y=y);return m=c/2,y=u/2,d=o.x-m,h=o.x+m,p=o.y-y,g=o.y+y,o.align="center",d<0&&h<=r?o.align="left":0<=d&&r<h&&(o.align="right"),o.baseline="middle",p<0&&g<=s?o.baseline="top":0<=p&&s<g&&(o.baseline="bottom"),!0}}function k0(e,t,n,i,r,s){let o=n/2;return e-o<0||e+o>r||t-(o=i/2)<0||t+o>s}function Bo(e,t,n,i,r,s,o,a){const l=r*s/(i*2),u=e(t-l),c=e(t+l),f=e(n-(s=s/2)),d=e(n+s);return o.outOfBounds(u,f,c,d)||o.getRange(u,f,c,d)||a&&a.getRange(u,f,c,d)}function one(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1];function l(u,c,f,d,h){const p=e.invert(u),g=e.invert(c);let m=f,y=s,b;if(!k0(p,g,d,h,r,s)&&!Bo(e,p,g,h,d,m,o,a)&&!Bo(e,p,g,h,d,h,o,null)){for(;y-m>=1;)b=(m+y)/2,Bo(e,p,g,h,d,b,o,a)?y=b:m=b;if(m>f)return[p,g,m,!0]}}return function(u){const c=u.datum.datum.items[i].items,f=c.length,d=u.datum.fontSize,h=mi.width(u.datum,u.datum.text);let p=n?d:0,g=!1,m=!1,y=0,b,v,x,_,k,w,$,S,E,A,R,C,M,T,O,P,j;for(let W=0;W<f;++W){for(b=c[W].x,x=c[W].y,v=c[W].x2===void 0?b:c[W].x2,_=c[W].y2===void 0?x:c[W].y2,b>v&&(j=b,b=v,v=j),x>_&&(j=x,x=_,_=j),E=e(b),R=e(v),A=~~((E+R)/2),C=e(x),T=e(_),M=~~((C+T)/2),$=A;$>=E;--$)for(S=M;S>=C;--S)P=l($,S,p,h,d),P&&([u.x,u.y,p,g]=P);for($=A;$<=R;++$)for(S=M;S<=T;++S)P=l($,S,p,h,d),P&&([u.x,u.y,p,g]=P);!g&&!n&&(O=Math.abs(v-b+_-x),k=(b+v)/2,w=(x+_)/2,O>=y&&!k0(k,w,h,d,r,s)&&!Bo(e,k,w,d,h,d,o,null)&&(y=O,u.x=k,u.y=w,m=!0))}return g||m?(k=h/2,w=d/2,o.setRange(e(u.x-k),e(u.y-w),e(u.x+k),e(u.y+w)),u.align="center",u.baseline="middle",!0):!1}}const ane=[-1,-1,1,1],lne=[-1,1,-1,1];function une(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1],l=e.bitmap();return function(u){const c=u.datum.datum.items[i].items,f=c.length,d=u.datum.fontSize,h=mi.width(u.datum,u.datum.text),p=[];let g=n?d:0,m=!1,y=!1,b=0,v,x,_,k,w,$,S,E,A,R,C,M;for(let T=0;T<f;++T){for(v=c[T].x,_=c[T].y,x=c[T].x2===void 0?v:c[T].x2,k=c[T].y2===void 0?_:c[T].y2,p.push([e((v+x)/2),e((_+k)/2)]);p.length;)if([S,E]=p.pop(),!(o.get(S,E)||a.get(S,E)||l.get(S,E))){l.set(S,E);for(let O=0;O<4;++O)w=S+ane[O],$=E+lne[O],l.outOfBounds(w,$,w,$)||p.push([w,$]);if(w=e.invert(S),$=e.invert(E),A=g,R=s,!k0(w,$,h,d,r,s)&&!Bo(e,w,$,d,h,A,o,a)&&!Bo(e,w,$,d,h,d,o,null)){for(;R-A>=1;)C=(A+R)/2,Bo(e,w,$,d,h,C,o,a)?R=C:A=C;A>g&&(u.x=w,u.y=$,g=A,m=!0)}}!m&&!n&&(M=Math.abs(x-v+k-_),w=(v+x)/2,$=(_+k)/2,M>=b&&!k0(w,$,h,d,r,s)&&!Bo(e,w,$,d,h,d,o,null)&&(b=M,u.x=w,u.y=$,y=!0))}return m||y?(w=h/2,$=d/2,o.setRange(e(u.x-w),e(u.y-$),e(u.x+w),e(u.y+$)),u.align="center",u.baseline="middle",!0):!1}}const cne=["right","center","left"],fne=["bottom","middle","top"];function dne(e,t,n,i){const r=e.width,s=e.height,o=t[0],a=t[1],l=i.length;return function(u){const c=u.boundary,f=u.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>r||c[3]>s)return!1;let d=u.textWidth??0,h,p,g,m,y,b,v,x,_,k,w,$,S,E,A;for(let R=0;R<l;++R){if(h=(n[R]&3)-1,p=(n[R]>>>2&3)-1,g=h===0&&p===0||i[R]<0,m=h&&p?Math.SQRT1_2:1,y=i[R]<0?-1:1,b=c[1+h]+i[R]*h*m,w=c[4+p]+y*f*p/2+i[R]*p*m,x=w-f/2,_=w+f/2,$=e(b),E=e(x),A=e(_),!d)if(pT($,$,E,A,o,a,b,b,x,_,c,g))d=mi.width(u.datum,u.datum.text);else continue;if(k=b+y*d*h/2,b=k-d/2,v=k+d/2,$=e(b),S=e(v),pT($,S,E,A,o,a,b,v,x,_,c,g))return u.x=h?h*y<0?v:b:k,u.y=p?p*y<0?_:x:w,u.align=cne[h*y+1],u.baseline=fne[p*y+1],o.setRange($,E,S,A),!0}return!1}}function pT(e,t,n,i,r,s,o,a,l,u,c,f){return!(r.outOfBounds(e,n,t,i)||(f&&s||r).getRange(e,n,t,i))}const yx=0,bx=4,vx=8,xx=0,_x=1,wx=2,hne={"top-left":yx+xx,top:yx+_x,"top-right":yx+wx,left:bx+xx,middle:bx+_x,right:bx+wx,"bottom-left":vx+xx,bottom:vx+_x,"bottom-right":vx+wx},pne={naive:sne,"reduced-search":one,floodfill:une};function gne(e,t,n,i,r,s,o,a,l,u,c){if(!e.length)return e;const f=Math.max(i.length,r.length),d=mne(i,f),h=yne(r,f),p=bne(e[0].datum),g=p==="group"&&e[0].datum.items[l].marktype,m=g==="area",y=vne(p,g,a,l),b=u===null||u===1/0,v=m&&c==="naive";let x=-1,_=-1;const k=e.map(E=>{const A=b?mi.width(E,E.text):void 0;return x=Math.max(x,A),_=Math.max(_,E.fontSize),{datum:E,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:y(E),textWidth:A}});u=u===null||u===1/0?Math.max(x,_)+Math.max(...i):u;const w=rne(t[0],t[1],u);let $;if(!v){n&&k.sort((R,C)=>n(R.datum,C.datum));let E=!1;for(let R=0;R<h.length&&!E;++R)E=h[R]===5||d[R]<0;const A=(p&&o||m)&&e.map(R=>R.datum);$=s.length||A?tne(w,A||[],s,E,m):ene(w,o&&k)}const S=m?pne[c](w,$,o,l):dne(w,$,h,d);return k.forEach(E=>E.opacity=+S(E)),k}function mne(e,t){const n=new Float64Array(t),i=e.length;for(let r=0;r<i;++r)n[r]=e[r]||0;for(let r=i;r<t;++r)n[r]=n[i-1];return n}function yne(e,t){const n=new Int8Array(t),i=e.length;for(let r=0;r<i;++r)n[r]|=hne[e[r]];for(let r=i;r<t;++r)n[r]=n[i-1];return n}function bne(e){return e&&e.mark&&e.mark.marktype}function vne(e,t,n,i){const r=s=>[s.x,s.x,s.x,s.y,s.y,s.y];return e?e==="line"||e==="area"?s=>r(s.datum):t==="line"?s=>{const o=s.datum.items[i].items;return r(o.length?o[n==="start"?0:o.length-1]:{x:NaN,y:NaN})}:s=>{const o=s.datum.bounds;return[o.x1,(o.x1+o.x2)/2,o.x2,o.y1,(o.y1+o.y2)/2,o.y2]}:r}const kx=["x","y","opacity","align","baseline"],gT=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function $x(e){I.call(this,null,e)}$x.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:gT},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:kx.length,default:kx}]},K($x,I,{transform(e,t){function n(s){const o=e[s];return Me(o)&&t.modified(o.fields)}const i=e.modified();if(!(i||t.changed(t.ADD_REM)||n("sort")))return;(!e.size||e.size.length!==2)&&U("Size parameter should be specified as a [width, height] array.");const r=e.as||kx;return gne(t.materialize(t.SOURCE).source||[],e.size,e.sort,ee(e.offset==null?1:e.offset),ee(e.anchor||gT),e.avoidMarks||[],e.avoidBaseMark!==!1,e.lineAnchor||"end",e.markIndex||0,e.padding===void 0?0:e.padding,e.method||"naive").forEach(s=>{const o=s.datum;o[r[0]]=s.x,o[r[1]]=s.y,o[r[2]]=s.opacity,o[r[3]]=s.align,o[r[4]]=s.baseline}),t.reflow(i).modifies(r)}});const xne=Object.freeze(Object.defineProperty({__proto__:null,label:$x},Symbol.toStringTag,{value:"Module"}));function mT(e,t){var n=[],i=function(c){return c(a)},r,s,o,a,l,u;if(t==null)n.push(e);else for(r={},s=0,o=e.length;s<o;++s)a=e[s],l=t.map(i),u=r[l],u||(r[l]=u=[],u.dims=l,n.push(u)),u.push(a);return n}function Ex(e){I.call(this,null,e)}Ex.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},K(Ex,I,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=mT(i,e.groupby),s=(e.groupby||[]).map(Et),o=s.length,a=e.as||[Et(e.x),Et(e.y)],l=[];r.forEach(u=>{yk(u,e.x,e.y,e.bandwidth||.3).forEach(c=>{const f={};for(let d=0;d<o;++d)f[s[d]]=u.dims[d];f[a[0]]=c[0],f[a[1]]=c[1],l.push(et(f))})}),this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}});const Cx={constant:gy,linear:my,log:fk,exp:dk,pow:hk,quad:yy,poly:pk},_ne=(e,t)=>e==="poly"?t:e==="quad"?2:1;function Sx(e){I.call(this,null,e)}Sx.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(Cx)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]},K(Sx,I,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const i=t.materialize(t.SOURCE).source,r=mT(i,e.groupby),s=(e.groupby||[]).map(Et),o=e.method||"linear",a=e.order==null?3:e.order,l=_ne(o,a),u=e.as||[Et(e.x),Et(e.y)],c=Cx[o],f=[];let d=e.extent;pe(Cx,o)||U("Invalid regression method: "+o),d!=null&&o==="log"&&d[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),r.forEach(h=>{if(h.length<=l){t.dataflow.warn("Skipping regression with more parameters than data points.");return}const g=c(h,e.x,e.y,a);if(e.params){f.push(et({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));return}const m=d||Rr(h,e.x),y=b=>{const v={};for(let x=0;x<s.length;++x)v[s[x]]=h.dims[x];v[u[0]]=b[0],v[u[1]]=b[1],f.push(et(v))};o==="linear"||o==="constant"?m.forEach(b=>y([b,g.predict(b)])):pp(g.predict,m,25,200).forEach(y)}),this.value&&(n.rem=this.value),this.value=n.add=n.source=f}return n}});const wne=Object.freeze(Object.defineProperty({__proto__:null,loess:Ex,regression:Sx},Symbol.toStringTag,{value:"Module"})),Ls=11102230246251565e-32,_n=134217729,kne=(3+8*Ls)*Ls;function Ax(e,t,n,i,r){let s,o,a,l,u=t[0],c=i[0],f=0,d=0;c>u==c>-u?(s=u,u=t[++f]):(s=c,c=i[++d]);let h=0;if(f<e&&d<n)for(c>u==c>-u?(o=u+s,a=s-(o-u),u=t[++f]):(o=c+s,a=s-(o-c),c=i[++d]),s=o,a!==0&&(r[h++]=a);f<e&&d<n;)c>u==c>-u?(o=s+u,l=o-s,a=s-(o-l)+(u-l),u=t[++f]):(o=s+c,l=o-s,a=s-(o-l)+(c-l),c=i[++d]),s=o,a!==0&&(r[h++]=a);for(;f<e;)o=s+u,l=o-s,a=s-(o-l)+(u-l),u=t[++f],s=o,a!==0&&(r[h++]=a);for(;d<n;)o=s+c,l=o-s,a=s-(o-l)+(c-l),c=i[++d],s=o,a!==0&&(r[h++]=a);return(s!==0||h===0)&&(r[h++]=s),h}function $ne(e,t){let n=t[0];for(let i=1;i<e;i++)n+=t[i];return n}function ad(e){return new Float64Array(e)}const Ene=(3+16*Ls)*Ls,Cne=(2+12*Ls)*Ls,Sne=(9+64*Ls)*Ls*Ls,Iu=ad(4),yT=ad(8),bT=ad(12),vT=ad(16),Pn=ad(4);function Ane(e,t,n,i,r,s,o){let a,l,u,c,f,d,h,p,g,m,y,b,v,x,_,k,w,$;const S=e-r,E=n-r,A=t-s,R=i-s;x=S*R,d=_n*S,h=d-(d-S),p=S-h,d=_n*R,g=d-(d-R),m=R-g,_=p*m-(x-h*g-p*g-h*m),k=A*E,d=_n*A,h=d-(d-A),p=A-h,d=_n*E,g=d-(d-E),m=E-g,w=p*m-(k-h*g-p*g-h*m),y=_-w,f=_-y,Iu[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-k,f=v-y,Iu[1]=v-(y+f)+(f-k),$=b+y,f=$-b,Iu[2]=b-($-f)+(y-f),Iu[3]=$;let C=$ne(4,Iu),M=Cne*o;if(C>=M||-C>=M||(f=e-S,a=e-(S+f)+(f-r),f=n-E,u=n-(E+f)+(f-r),f=t-A,l=t-(A+f)+(f-s),f=i-R,c=i-(R+f)+(f-s),a===0&&l===0&&u===0&&c===0)||(M=Sne*o+kne*Math.abs(C),C+=S*c+R*a-(A*u+E*l),C>=M||-C>=M))return C;x=a*R,d=_n*a,h=d-(d-a),p=a-h,d=_n*R,g=d-(d-R),m=R-g,_=p*m-(x-h*g-p*g-h*m),k=l*E,d=_n*l,h=d-(d-l),p=l-h,d=_n*E,g=d-(d-E),m=E-g,w=p*m-(k-h*g-p*g-h*m),y=_-w,f=_-y,Pn[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-k,f=v-y,Pn[1]=v-(y+f)+(f-k),$=b+y,f=$-b,Pn[2]=b-($-f)+(y-f),Pn[3]=$;const T=Ax(4,Iu,4,Pn,yT);x=S*c,d=_n*S,h=d-(d-S),p=S-h,d=_n*c,g=d-(d-c),m=c-g,_=p*m-(x-h*g-p*g-h*m),k=A*u,d=_n*A,h=d-(d-A),p=A-h,d=_n*u,g=d-(d-u),m=u-g,w=p*m-(k-h*g-p*g-h*m),y=_-w,f=_-y,Pn[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-k,f=v-y,Pn[1]=v-(y+f)+(f-k),$=b+y,f=$-b,Pn[2]=b-($-f)+(y-f),Pn[3]=$;const O=Ax(T,yT,4,Pn,bT);x=a*c,d=_n*a,h=d-(d-a),p=a-h,d=_n*c,g=d-(d-c),m=c-g,_=p*m-(x-h*g-p*g-h*m),k=l*u,d=_n*l,h=d-(d-l),p=l-h,d=_n*u,g=d-(d-u),m=u-g,w=p*m-(k-h*g-p*g-h*m),y=_-w,f=_-y,Pn[0]=_-(y+f)+(f-w),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-k,f=v-y,Pn[1]=v-(y+f)+(f-k),$=b+y,f=$-b,Pn[2]=b-($-f)+(y-f),Pn[3]=$;const P=Ax(O,bT,4,Pn,vT);return vT[P-1]}function $0(e,t,n,i,r,s){const o=(t-s)*(n-r),a=(e-r)*(i-s),l=o-a,u=Math.abs(o+a);return Math.abs(l)>=Ene*u?l:-Ane(e,t,n,i,r,s,u)}const xT=Math.pow(2,-52),E0=new Uint32Array(512);class C0{static from(t,n=Nne,i=One){const r=t.length,s=new Float64Array(r*2);for(let o=0;o<r;o++){const a=t[o];s[2*o]=n(a),s[2*o+1]=i(a)}return new C0(s)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*n-5,0);this._triangles=new Uint32Array(i*3),this._halfedges=new Int32Array(i*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:i,_hullTri:r,_hullHash:s}=this,o=t.length>>1;let a=1/0,l=1/0,u=-1/0,c=-1/0;for(let E=0;E<o;E++){const A=t[2*E],R=t[2*E+1];A<a&&(a=A),R<l&&(l=R),A>u&&(u=A),R>c&&(c=R),this._ids[E]=E}const f=(a+u)/2,d=(l+c)/2;let h=1/0,p,g,m;for(let E=0;E<o;E++){const A=Tx(f,d,t[2*E],t[2*E+1]);A<h&&(p=E,h=A)}const y=t[2*p],b=t[2*p+1];h=1/0;for(let E=0;E<o;E++){if(E===p)continue;const A=Tx(y,b,t[2*E],t[2*E+1]);A<h&&A>0&&(g=E,h=A)}let v=t[2*g],x=t[2*g+1],_=1/0;for(let E=0;E<o;E++){if(E===p||E===g)continue;const A=Fne(y,b,v,x,t[2*E],t[2*E+1]);A<_&&(m=E,_=A)}let k=t[2*m],w=t[2*m+1];if(_===1/0){for(let R=0;R<o;R++)this._dists[R]=t[2*R]-t[0]||t[2*R+1]-t[1];zu(this._ids,this._dists,0,o-1);const E=new Uint32Array(o);let A=0;for(let R=0,C=-1/0;R<o;R++){const M=this._ids[R];this._dists[M]>C&&(E[A++]=M,C=this._dists[M])}this.hull=E.subarray(0,A),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if($0(y,b,v,x,k,w)<0){const E=g,A=v,R=x;g=m,v=k,x=w,m=E,k=A,w=R}const $=Dne(y,b,v,x,k,w);this._cx=$.x,this._cy=$.y;for(let E=0;E<o;E++)this._dists[E]=Tx(t[2*E],t[2*E+1],$.x,$.y);zu(this._ids,this._dists,0,o-1),this._hullStart=p;let S=3;i[p]=n[m]=g,i[g]=n[p]=m,i[m]=n[g]=p,r[p]=0,r[g]=1,r[m]=2,s.fill(-1),s[this._hashKey(y,b)]=p,s[this._hashKey(v,x)]=g,s[this._hashKey(k,w)]=m,this.trianglesLen=0,this._addTriangle(p,g,m,-1,-1,-1);for(let E=0,A,R;E<this._ids.length;E++){const C=this._ids[E],M=t[2*C],T=t[2*C+1];if(E>0&&Math.abs(M-A)<=xT&&Math.abs(T-R)<=xT||(A=M,R=T,C===p||C===g||C===m))continue;let O=0;for(let ae=0,ke=this._hashKey(M,T);ae<this._hashSize&&(O=s[(ke+ae)%this._hashSize],!(O!==-1&&O!==i[O]));ae++);O=n[O];let P=O,j;for(;j=i[P],$0(M,T,t[2*P],t[2*P+1],t[2*j],t[2*j+1])>=0;)if(P=j,P===O){P=-1;break}if(P===-1)continue;let W=this._addTriangle(P,C,i[P],-1,-1,r[P]);r[C]=this._legalize(W+2),r[P]=W,S++;let ne=i[P];for(;j=i[ne],$0(M,T,t[2*ne],t[2*ne+1],t[2*j],t[2*j+1])<0;)W=this._addTriangle(ne,C,j,r[C],-1,r[ne]),r[C]=this._legalize(W+2),i[ne]=ne,S--,ne=j;if(P===O)for(;j=n[P],$0(M,T,t[2*j],t[2*j+1],t[2*P],t[2*P+1])<0;)W=this._addTriangle(j,C,P,-1,r[P],r[j]),this._legalize(W+2),r[j]=W,i[P]=P,S--,P=j;this._hullStart=n[C]=P,i[P]=n[ne]=C,i[C]=ne,s[this._hashKey(M,T)]=C,s[this._hashKey(t[2*P],t[2*P+1])]=P}this.hull=new Uint32Array(S);for(let E=0,A=this._hullStart;E<S;E++)this.hull[E]=A,A=i[A];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(Tne(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:i,coords:r}=this;let s=0,o=0;for(;;){const a=i[t],l=t-t%3;if(o=l+(t+2)%3,a===-1){if(s===0)break;t=E0[--s];continue}const u=a-a%3,c=l+(t+1)%3,f=u+(a+2)%3,d=n[o],h=n[t],p=n[c],g=n[f];if(Mne(r[2*d],r[2*d+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1],r[2*g],r[2*g+1])){n[t]=g,n[a]=d;const y=i[f];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===f){this._hullTri[v]=t;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(t,y),this._link(a,i[o]),this._link(o,f);const b=u+(a+1)%3;s<E0.length&&(E0[s++]=b)}else{if(s===0)break;t=E0[--s]}}return o}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,i,r,s,o){const a=this.trianglesLen;return this._triangles[a]=t,this._triangles[a+1]=n,this._triangles[a+2]=i,this._link(a,r),this._link(a+1,s),this._link(a+2,o),this.trianglesLen+=3,a}}function Tne(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function Tx(e,t,n,i){const r=e-n,s=t-i;return r*r+s*s}function Mne(e,t,n,i,r,s,o,a){const l=e-o,u=t-a,c=n-o,f=i-a,d=r-o,h=s-a,p=l*l+u*u,g=c*c+f*f,m=d*d+h*h;return l*(f*m-g*h)-u*(c*m-g*d)+p*(c*h-f*d)<0}function Fne(e,t,n,i,r,s){const o=n-e,a=i-t,l=r-e,u=s-t,c=o*o+a*a,f=l*l+u*u,d=.5/(o*u-a*l),h=(u*c-a*f)*d,p=(o*f-l*c)*d;return h*h+p*p}function Dne(e,t,n,i,r,s){const o=n-e,a=i-t,l=r-e,u=s-t,c=o*o+a*a,f=l*l+u*u,d=.5/(o*u-a*l),h=e+(u*c-a*f)*d,p=t+(o*f-l*c)*d;return{x:h,y:p}}function zu(e,t,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const s=e[r],o=t[s];let a=r-1;for(;a>=n&&t[e[a]]>o;)e[a+1]=e[a--];e[a+1]=s}else{const r=n+i>>1;let s=n+1,o=i;ld(e,r,s),t[e[n]]>t[e[i]]&&ld(e,n,i),t[e[s]]>t[e[i]]&&ld(e,s,i),t[e[n]]>t[e[s]]&&ld(e,n,s);const a=e[s],l=t[a];for(;;){do s++;while(t[e[s]]<l);do o--;while(t[e[o]]>l);if(o<s)break;ld(e,s,o)}e[n+1]=e[o],e[o]=a,i-s+1>=o-n?(zu(e,t,s,i),zu(e,t,n,o-1)):(zu(e,t,n,o-1),zu(e,t,s,i))}}function ld(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function Nne(e){return e[0]}function One(e){return e[1]}const _T=1e-6;class Wa{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,i){t=+t,n=+n,i=+i;const r=t+i,s=n;if(i<0)throw new Error("negative radius");this._x1===null?this._+=`M${r},${s}`:(Math.abs(this._x1-r)>_T||Math.abs(this._y1-s)>_T)&&(this._+="L"+r+","+s),i&&(this._+=`A${i},${i},0,1,1,${t-i},${n}A${i},${i},0,1,1,${this._x1=r},${this._y1=s}`)}rect(t,n,i,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+i}v${+r}h${-i}Z`}value(){return this._||null}}class Mx{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}let Rne=class{constructor(t,[n,i,r,s]=[0,0,960,500]){if(!((r=+r)>=(n=+n))||!((s=+s)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=r,this.xmin=n,this.ymax=s,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:i},vectors:r}=this;let s,o;const a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let g=0,m=0,y=i.length,b,v;g<y;g+=3,m+=2){const x=i[g]*2,_=i[g+1]*2,k=i[g+2]*2,w=t[x],$=t[x+1],S=t[_],E=t[_+1],A=t[k],R=t[k+1],C=S-w,M=E-$,T=A-w,O=R-$,P=(C*O-M*T)*2;if(Math.abs(P)<1e-9){if(s===void 0){s=o=0;for(const W of n)s+=t[W*2],o+=t[W*2+1];s/=n.length,o/=n.length}const j=1e9*Math.sign((s-w)*O-(o-$)*T);b=(w+A)/2-j*O,v=($+R)/2+j*T}else{const j=1/P,W=C*C+M*M,ne=T*T+O*O;b=w+(O*W-M*ne)*j,v=$+(C*ne-T*W)*j}a[m]=b,a[m+1]=v}let l=n[n.length-1],u,c=l*4,f,d=t[2*l],h,p=t[2*l+1];r.fill(0);for(let g=0;g<n.length;++g)l=n[g],u=c,f=d,h=p,c=l*4,d=t[2*l],p=t[2*l+1],r[u+2]=r[c]=h-p,r[u+3]=r[c+1]=d-f}render(t){const n=t==null?t=new Wa:void 0,{delaunay:{halfedges:i,inedges:r,hull:s},circumcenters:o,vectors:a}=this;if(s.length<=1)return null;for(let c=0,f=i.length;c<f;++c){const d=i[c];if(d<c)continue;const h=Math.floor(c/3)*2,p=Math.floor(d/3)*2,g=o[h],m=o[h+1],y=o[p],b=o[p+1];this._renderSegment(g,m,y,b,t)}let l,u=s[s.length-1];for(let c=0;c<s.length;++c){l=u,u=s[c];const f=Math.floor(r[u]/3)*2,d=o[f],h=o[f+1],p=l*4,g=this._project(d,h,a[p+2],a[p+3]);g&&this._renderSegment(d,h,g[0],g[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new Wa:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const i=n==null?n=new Wa:void 0,r=this._clip(t);if(r===null||!r.length)return;n.moveTo(r[0],r[1]);let s=r.length;for(;r[0]===r[s-2]&&r[1]===r[s-1]&&s>1;)s-=2;for(let o=2;o<s;o+=2)(r[o]!==r[o-2]||r[o+1]!==r[o-1])&&n.lineTo(r[o],r[o+1]);return n.closePath(),i&&i.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,i=t.length/2;n<i;++n){const r=this.cellPolygon(n);r&&(r.index=n,yield r)}}cellPolygon(t){const n=new Mx;return this.renderCell(t,n),n.value()}_renderSegment(t,n,i,r,s){let o;const a=this._regioncode(t,n),l=this._regioncode(i,r);a===0&&l===0?(s.moveTo(t,n),s.lineTo(i,r)):(o=this._clipSegment(t,n,i,r,a,l))&&(s.moveTo(o[0],o[1]),s.lineTo(o[2],o[3]))}contains(t,n,i){return n=+n,n!==n||(i=+i,i!==i)?!1:this.delaunay._step(t,n,i)===t}*neighbors(t){const n=this._clip(t);if(n)for(const i of this.delaunay.neighbors(t)){const r=this._clip(i);if(r){e:for(let s=0,o=n.length;s<o;s+=2)for(let a=0,l=r.length;a<l;a+=2)if(n[s]===r[a]&&n[s+1]===r[a+1]&&n[(s+2)%o]===r[(a+l-2)%l]&&n[(s+3)%o]===r[(a+l-1)%l]){yield i;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:i,halfedges:r,triangles:s}}=this,o=i[t];if(o===-1)return null;const a=[];let l=o;do{const u=Math.floor(l/3);if(a.push(n[u*2],n[u*2+1]),l=l%3===2?l-2:l+1,s[l]!==t)break;l=r[l]}while(l!==o&&l!==-1);return a}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:i}=this,r=t*4;return this._simplify(i[r]||i[r+1]?this._clipInfinite(t,n,i[r],i[r+1],i[r+2],i[r+3]):this._clipFinite(t,n))}_clipFinite(t,n){const i=n.length;let r=null,s,o,a=n[i-2],l=n[i-1],u,c=this._regioncode(a,l),f,d=0;for(let h=0;h<i;h+=2)if(s=a,o=l,a=n[h],l=n[h+1],u=c,c=this._regioncode(a,l),u===0&&c===0)f=d,d=0,r?r.push(a,l):r=[a,l];else{let p,g,m,y,b;if(u===0){if((p=this._clipSegment(s,o,a,l,u,c))===null)continue;[g,m,y,b]=p}else{if((p=this._clipSegment(a,l,s,o,c,u))===null)continue;[y,b,g,m]=p,f=d,d=this._edgecode(g,m),f&&d&&this._edge(t,f,d,r,r.length),r?r.push(g,m):r=[g,m]}f=d,d=this._edgecode(y,b),f&&d&&this._edge(t,f,d,r,r.length),r?r.push(y,b):r=[y,b]}if(r)f=d,d=this._edgecode(r[0],r[1]),f&&d&&this._edge(t,f,d,r,r.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return r}_clipSegment(t,n,i,r,s,o){const a=s<o;for(a&&([t,n,i,r,s,o]=[i,r,t,n,o,s]);;){if(s===0&&o===0)return a?[i,r,t,n]:[t,n,i,r];if(s&o)return null;let l,u,c=s||o;c&8?(l=t+(i-t)*(this.ymax-n)/(r-n),u=this.ymax):c&4?(l=t+(i-t)*(this.ymin-n)/(r-n),u=this.ymin):c&2?(u=n+(r-n)*(this.xmax-t)/(i-t),l=this.xmax):(u=n+(r-n)*(this.xmin-t)/(i-t),l=this.xmin),s?(t=l,n=u,s=this._regioncode(t,n)):(i=l,r=u,o=this._regioncode(i,r))}}_clipInfinite(t,n,i,r,s,o){let a=Array.from(n),l;if((l=this._project(a[0],a[1],i,r))&&a.unshift(l[0],l[1]),(l=this._project(a[a.length-2],a[a.length-1],s,o))&&a.push(l[0],l[1]),a=this._clipFinite(t,a))for(let u=0,c=a.length,f,d=this._edgecode(a[c-2],a[c-1]);u<c;u+=2)f=d,d=this._edgecode(a[u],a[u+1]),f&&d&&(u=this._edge(t,f,d,a,u),c=a.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(a=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return a}_edge(t,n,i,r,s){for(;n!==i;){let o,a;switch(n){case 5:n=4;continue;case 4:n=6,o=this.xmax,a=this.ymin;break;case 6:n=2;continue;case 2:n=10,o=this.xmax,a=this.ymax;break;case 10:n=8;continue;case 8:n=9,o=this.xmin,a=this.ymax;break;case 9:n=1;continue;case 1:n=5,o=this.xmin,a=this.ymin;break}(r[s]!==o||r[s+1]!==a)&&this.contains(t,o,a)&&(r.splice(s,0,o,a),s+=2)}return s}_project(t,n,i,r){let s=1/0,o,a,l;if(r<0){if(n<=this.ymin)return null;(o=(this.ymin-n)/r)<s&&(l=this.ymin,a=t+(s=o)*i)}else if(r>0){if(n>=this.ymax)return null;(o=(this.ymax-n)/r)<s&&(l=this.ymax,a=t+(s=o)*i)}if(i>0){if(t>=this.xmax)return null;(o=(this.xmax-t)/i)<s&&(a=this.xmax,l=n+(s=o)*r)}else if(i<0){if(t<=this.xmin)return null;(o=(this.xmin-t)/i)<s&&(a=this.xmin,l=n+(s=o)*r)}return[a,l]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const i=(n+2)%t.length,r=(n+4)%t.length;(t[n]===t[i]&&t[i]===t[r]||t[n+1]===t[i+1]&&t[i+1]===t[r+1])&&(t.splice(i,2),n-=2)}t.length||(t=null)}return t}};const Lne=2*Math.PI,Pu=Math.pow;function Ine(e){return e[0]}function zne(e){return e[1]}function Pne(e){const{triangles:t,coords:n}=e;for(let i=0;i<t.length;i+=3){const r=2*t[i],s=2*t[i+1],o=2*t[i+2];if((n[o]-n[r])*(n[s+1]-n[r+1])-(n[s]-n[r])*(n[o+1]-n[r+1])>1e-10)return!1}return!0}function Bne(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Fx{static from(t,n=Ine,i=zne,r){return new Fx("length"in t?jne(t,n,i,r):Float64Array.from(Une(t,n,i,r)))}constructor(t){this._delaunator=new C0(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&Pne(t)){this.collinear=Int32Array.from({length:n.length/2},(d,h)=>h).sort((d,h)=>n[2*d]-n[2*h]||n[2*d+1]-n[2*h+1]);const l=this.collinear[0],u=this.collinear[this.collinear.length-1],c=[n[2*l],n[2*l+1],n[2*u],n[2*u+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let d=0,h=n.length/2;d<h;++d){const p=Bne(n[2*d],n[2*d+1],f);n[2*d]=p[0],n[2*d+1]=p[1]}this._delaunator=new C0(n)}else delete this.collinear;const i=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,s=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let l=0,u=i.length;l<u;++l){const c=s[l%3===2?l-2:l+1];(i[l]===-1||o[c]===-1)&&(o[c]=l)}for(let l=0,u=r.length;l<u;++l)a[r[l]]=l;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,r.length===2&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Rne(this,t)}*neighbors(t){const{inedges:n,hull:i,_hullIndex:r,halfedges:s,triangles:o,collinear:a}=this;if(a){const f=a.indexOf(t);f>0&&(yield a[f-1]),f<a.length-1&&(yield a[f+1]);return}const l=n[t];if(l===-1)return;let u=l,c=-1;do{if(yield c=o[u],u=u%3===2?u-2:u+1,o[u]!==t)return;if(u=s[u],u===-1){const f=i[(r[t]+1)%i.length];f!==c&&(yield f);return}}while(u!==l)}find(t,n,i=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const r=i;let s;for(;(s=this._step(i,t,n))>=0&&s!==i&&s!==r;)i=s;return s}_step(t,n,i){const{inedges:r,hull:s,_hullIndex:o,halfedges:a,triangles:l,points:u}=this;if(r[t]===-1||!u.length)return(t+1)%(u.length>>1);let c=t,f=Pu(n-u[t*2],2)+Pu(i-u[t*2+1],2);const d=r[t];let h=d;do{let p=l[h];const g=Pu(n-u[p*2],2)+Pu(i-u[p*2+1],2);if(g<f&&(f=g,c=p),h=h%3===2?h-2:h+1,l[h]!==t)break;if(h=a[h],h===-1){if(h=s[(o[t]+1)%s.length],h!==p&&Pu(n-u[h*2],2)+Pu(i-u[h*2+1],2)<f)return h;break}}while(h!==d);return c}render(t){const n=t==null?t=new Wa:void 0,{points:i,halfedges:r,triangles:s}=this;for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l<o)continue;const u=s[o]*2,c=s[l]*2;t.moveTo(i[u],i[u+1]),t.lineTo(i[c],i[c+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const i=t==null?t=new Wa:void 0,{points:r}=this;for(let s=0,o=r.length;s<o;s+=2){const a=r[s],l=r[s+1];t.moveTo(a+n,l),t.arc(a,l,n,0,Lne)}return i&&i.value()}renderHull(t){const n=t==null?t=new Wa:void 0,{hull:i,points:r}=this,s=i[0]*2,o=i.length;t.moveTo(r[s],r[s+1]);for(let a=1;a<o;++a){const l=2*i[a];t.lineTo(r[l],r[l+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new Mx;return this.renderHull(t),t.value()}renderTriangle(t,n){const i=n==null?n=new Wa:void 0,{points:r,triangles:s}=this,o=s[t*=3]*2,a=s[t+1]*2,l=s[t+2]*2;return n.moveTo(r[o],r[o+1]),n.lineTo(r[a],r[a+1]),n.lineTo(r[l],r[l+1]),n.closePath(),i&&i.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,i=t.length/3;n<i;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new Mx;return this.renderTriangle(t,n),n.value()}}function jne(e,t,n,i){const r=e.length,s=new Float64Array(r*2);for(let o=0;o<r;++o){const a=e[o];s[o*2]=t.call(i,a,o,e),s[o*2+1]=n.call(i,a,o,e)}return s}function*Une(e,t,n,i){let r=0;for(const s of e)yield t.call(i,s,r,e),yield n.call(i,s,r,e),++r}function Dx(e){I.call(this,null,e)}Dx.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const qne=[-1e5,-1e5,1e5,1e5];K(Dx,I,{transform(e,t){const n=e.as||"path",i=t.source;if(!i||!i.length)return t;let r=e.size;r=r?[0,0,r[0],r[1]]:(r=e.extent)?[r[0][0],r[0][1],r[1][0],r[1][1]]:qne;const s=this.value=Fx.from(i,e.x,e.y).voronoi(r);for(let o=0,a=i.length;o<a;++o){const l=s.cellPolygon(o);i[o][n]=l&&!Hne(l)?Wne(l):null}return t.reflow(e.modified()).modifies(n)}});function Wne(e){const t=e[0][0],n=e[0][1];let i=e.length-1;for(;e[i][0]===t&&e[i][1]===n;--i);return"M"+e.slice(0,i+1).join("L")+"Z"}function Hne(e){return e.length===2&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]}const Gne=Object.freeze(Object.defineProperty({__proto__:null,voronoi:Dx},Symbol.toStringTag,{value:"Module"}));var Nx=Math.PI/180,ud=64,S0=2048;function Vne(){var e=[256,256],t,n,i,r,s,o,a,l=wT,u=[],c=Math.random,f={};f.layout=function(){for(var p=d(mo()),g=Qne((e[0]>>5)*e[1]),m=null,y=u.length,b=-1,v=[],x=u.map(k=>({text:t(k),font:n(k),style:r(k),weight:s(k),rotate:o(k),size:~~(i(k)+1e-14),padding:a(k),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:k})).sort((k,w)=>w.size-k.size);++b<y;){var _=x[b];_.x=e[0]*(c()+.5)>>1,_.y=e[1]*(c()+.5)>>1,Xne(p,_,x,b),_.hasText&&h(g,_,m)&&(v.push(_),m?Zne(m,_):m=[{x:_.x+_.x0,y:_.y+_.y0},{x:_.x+_.x1,y:_.y+_.y1}],_.x-=e[0]>>1,_.y-=e[1]>>1)}return v};function d(p){p.width=p.height=1;var g=Math.sqrt(p.getContext("2d").getImageData(0,0,1,1).data.length>>2);p.width=(ud<<5)/g,p.height=S0/g;var m=p.getContext("2d");return m.fillStyle=m.strokeStyle="red",m.textAlign="center",{context:m,ratio:g}}function h(p,g,m){for(var y=g.x,b=g.y,v=Math.sqrt(e[0]*e[0]+e[1]*e[1]),x=l(e),_=c()<.5?1:-1,k=-_,w,$,S;(w=x(k+=_))&&($=~~w[0],S=~~w[1],!(Math.min(Math.abs($),Math.abs(S))>=v));)if(g.x=y+$,g.y=b+S,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>e[0]||g.y+g.y1>e[1])&&(!m||!Yne(g,p,e[0]))&&(!m||Kne(g,m))){for(var E=g.sprite,A=g.width>>5,R=e[0]>>5,C=g.x-(A<<4),M=C&127,T=32-M,O=g.y1-g.y0,P=(g.y+g.y0)*R+(C>>5),j,W=0;W<O;W++){j=0;for(var ne=0;ne<=A;ne++)p[P+ne]|=j<<T|(ne<A?(j=E[W*A+ne])>>>M:0);P+=R}return g.sprite=null,!0}return!1}return f.words=function(p){return arguments.length?(u=p,f):u},f.size=function(p){return arguments.length?(e=[+p[0],+p[1]],f):e},f.font=function(p){return arguments.length?(n=Ha(p),f):n},f.fontStyle=function(p){return arguments.length?(r=Ha(p),f):r},f.fontWeight=function(p){return arguments.length?(s=Ha(p),f):s},f.rotate=function(p){return arguments.length?(o=Ha(p),f):o},f.text=function(p){return arguments.length?(t=Ha(p),f):t},f.spiral=function(p){return arguments.length?(l=eie[p]||p,f):l},f.fontSize=function(p){return arguments.length?(i=Ha(p),f):i},f.padding=function(p){return arguments.length?(a=Ha(p),f):a},f.random=function(p){return arguments.length?(c=p,f):c},f}function Xne(e,t,n,i){if(!t.sprite){var r=e.context,s=e.ratio;r.clearRect(0,0,(ud<<5)/s,S0/s);var o=0,a=0,l=0,u=n.length,c,f,d,h,p;for(--i;++i<u;){if(t=n[i],r.save(),r.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font,c=r.measureText(t.text+"m").width*s,d=t.size<<1,t.rotate){var g=Math.sin(t.rotate*Nx),m=Math.cos(t.rotate*Nx),y=c*m,b=c*g,v=d*m,x=d*g;c=Math.max(Math.abs(y+x),Math.abs(y-x))+31>>5<<5,d=~~Math.max(Math.abs(b+v),Math.abs(b-v))}else c=c+31>>5<<5;if(d>l&&(l=d),o+c>=ud<<5&&(o=0,a+=l,l=0),a+d>=S0)break;r.translate((o+(c>>1))/s,(a+(d>>1))/s),t.rotate&&r.rotate(t.rotate*Nx),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=c,t.height=d,t.xoff=o,t.yoff=a,t.x1=c>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=c}for(var _=r.getImageData(0,0,(ud<<5)/s,S0/s).data,k=[];--i>=0;)if(t=n[i],!!t.hasText){for(c=t.width,f=c>>5,d=t.y1-t.y0,h=0;h<d*f;h++)k[h]=0;if(o=t.xoff,o==null)return;a=t.yoff;var w=0,$=-1;for(p=0;p<d;p++){for(h=0;h<c;h++){var S=f*p+(h>>5),E=_[(a+p)*(ud<<5)+(o+h)<<2]?1<<31-h%32:0;k[S]|=E,w|=E}w?$=p:(t.y0++,d--,p--,a++)}t.y1=t.y0+$,t.sprite=k.slice(0,(t.y1-t.y0)*f)}}}function Yne(e,t,n){n>>=5;for(var i=e.sprite,r=e.width>>5,s=e.x-(r<<4),o=s&127,a=32-o,l=e.y1-e.y0,u=(e.y+e.y0)*n+(s>>5),c,f=0;f<l;f++){c=0;for(var d=0;d<=r;d++)if((c<<a|(d<r?(c=i[f*r+d])>>>o:0))&t[u+d])return!0;u+=n}return!1}function Zne(e,t){var n=e[0],i=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function Kne(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function wT(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Jne(e){var t=4,n=t*e[0]/e[1],i=0,r=0;return function(s){var o=s<0?-1:1;switch(Math.sqrt(1+4*o*s)-o&3){case 0:i+=n;break;case 1:r+=t;break;case 2:i-=n;break;default:r-=t;break}return[i,r]}}function Qne(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function Ha(e){return typeof e=="function"?e:function(){return e}}var eie={archimedean:wT,rectangular:Jne};const kT=["x","y","font","fontSize","fontStyle","fontWeight","angle"],tie=["text","font","rotate","fontSize","fontStyle","fontWeight"];function Ox(e){I.call(this,Vne(),e)}Ox.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:kT}]},K(Ox,I,{transform(e,t){e.size&&!(e.size[0]&&e.size[1])&&U("Wordcloud size dimensions must be non-zero.");function n(p){const g=e[p];return Me(g)&&t.modified(g.fields)}const i=e.modified();if(!(i||t.changed(t.ADD_REM)||tie.some(n)))return;const r=t.materialize(t.SOURCE).source,s=this.value,o=e.as||kT;let a=e.fontSize||14,l;if(Me(a)?l=e.fontSizeRange:a=pn(a),l){const p=a,g=Ke("sqrt")().domain(Rr(r,p)).range(l);a=m=>g(p(m))}r.forEach(p=>{p[o[0]]=NaN,p[o[1]]=NaN,p[o[3]]=0});const u=s.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(Di).layout(),c=s.size(),f=c[0]>>1,d=c[1]>>1,h=u.length;for(let p=0,g,m;p<h;++p)g=u[p],m=g.datum,m[o[0]]=g.x+f,m[o[1]]=g.y+d,m[o[2]]=g.font,m[o[3]]=g.size,m[o[4]]=g.style,m[o[5]]=g.weight,m[o[6]]=g.rotate;return t.reflow(i).modifies(o)}});const nie=Object.freeze(Object.defineProperty({__proto__:null,wordcloud:Ox},Symbol.toStringTag,{value:"Module"})),iie=e=>new Uint8Array(e),rie=e=>new Uint16Array(e),cd=e=>new Uint32Array(e);function sie(){let e=8,t=[],n=cd(0),i=A0(0,e),r=A0(0,e);return{data:()=>t,seen:()=>n=oie(n,t.length),add(s){for(let o=0,a=t.length,l=s.length,u;o<l;++o)u=s[o],u._index=a++,t.push(u)},remove(s,o){const a=t.length,l=Array(a-s),u=t;let c,f,d;for(f=0;!o[f]&&f<a;++f)l[f]=t[f],u[f]=f;for(d=f;f<a;++f)c=t[f],o[f]?u[f]=-1:(u[f]=d,i[d]=i[f],r[d]=r[f],l[d]=c,c._index=d++),i[f]=0;return t=l,u},size:()=>t.length,curr:()=>i,prev:()=>r,reset:s=>r[s]=i[s],all:()=>e<257?255:e<65537?65535:4294967295,set(s,o){i[s]|=o},clear(s,o){i[s]&=~o},resize(s,o){const a=i.length;(s>a||o>e)&&(e=Math.max(o,e),i=A0(s,e,i),r=A0(s,e))}}}function oie(e,t,n){return e.length>=t?e:(n=n||new e.constructor(t),n.set(e),n)}function A0(e,t,n){const i=(t<257?iie:t<65537?rie:cd)(e);return n&&i.set(n),i}function $T(e,t,n){const i=1<<t;return{one:i,zero:~i,range:n.slice(),bisect:e.bisect,index:e.index,size:e.size,onAdd(r,s){const o=this,a=o.bisect(o.range,r.value),l=r.index,u=a[0],c=a[1],f=l.length;let d;for(d=0;d<u;++d)s[l[d]]|=i;for(d=c;d<f;++d)s[l[d]]|=i;return o}}}function ET(){let e=cd(0),t=[],n=0;function i(a,l,u){if(!l.length)return[];const c=n,f=l.length,d=cd(f);let h=Array(f),p,g,m;for(m=0;m<f;++m)h[m]=a(l[m]),d[m]=m;if(h=aie(h,d),c)p=t,g=e,t=Array(c+f),e=cd(c+f),lie(u,p,g,c,h,d,f,t,e);else{if(u>0)for(m=0;m<f;++m)d[m]+=u;t=h,e=d}return n=c+f,{index:d,value:h}}function r(a,l){const u=n;let c,f,d;for(f=0;!l[e[f]]&&f<u;++f);for(d=f;f<u;++f)l[c=e[f]]||(e[d]=c,t[d]=t[f],++d);n=u-a}function s(a){for(let l=0,u=n;l<u;++l)e[l]=a[e[l]]}function o(a,l){let u;return l?u=l.length:(l=t,u=n),[SU(l,a[0],0,u),zh(l,a[1],0,u)]}return{insert:i,remove:r,bisect:o,reindex:s,index:()=>e,size:()=>n}}function aie(e,t){return e.sort.call(t,(n,i)=>{const r=e[n],s=e[i];return r<s?-1:r>s?1:0}),MU(e,t)}function lie(e,t,n,i,r,s,o,a,l){let u=0,c=0,f;for(f=0;u<i&&c<o;++f)t[u]<r[c]?(a[f]=t[u],l[f]=n[u++]):(a[f]=r[c],l[f]=s[c++]+e);for(;u<i;++u,++f)a[f]=t[u],l[f]=n[u];for(;c<o;++c,++f)a[f]=r[c],l[f]=s[c]+e}function Rx(e){I.call(this,sie(),e),this._indices=null,this._dims=null}Rx.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},K(Rx,I,{transform(e,t){if(this._dims){var n=e.modified("fields")||e.fields.some(i=>t.modified(i.fields));return n?this.reinit(e,t):this.eval(e,t)}else return this.init(e,t)},init(e,t){const n=e.fields,i=e.query,r=this._indices={},s=this._dims=[],o=i.length;let a=0,l,u;for(;a<o;++a)l=n[a].fname,u=r[l]||(r[l]=ET()),s.push($T(u,a,i[a]));return this.eval(e,t)},reinit(e,t){const n=t.materialize().fork(),i=e.fields,r=e.query,s=this._indices,o=this._dims,a=this.value,l=a.curr(),u=a.prev(),c=a.all(),f=n.rem=n.add,d=n.mod,h=r.length,p={};let g,m,y,b,v,x,_,k,w;if(u.set(l),t.rem.length&&(v=this.remove(e,t,n)),t.add.length&&a.add(t.add),t.mod.length)for(x={},b=t.mod,_=0,k=b.length;_<k;++_)x[b[_]._index]=1;for(_=0;_<h;++_)w=i[_],(!o[_]||e.modified("fields",_)||t.modified(w.fields))&&(y=w.fname,(g=p[y])||(s[y]=m=ET(),p[y]=g=m.insert(w,t.source,0)),o[_]=$T(m,_,r[_]).onAdd(g,l));for(_=0,k=a.data().length;_<k;++_)v[_]||(u[_]!==l[_]?f.push(_):x[_]&&l[_]!==c&&d.push(_));return a.mask=(1<<h)-1,n},eval(e,t){const n=t.materialize().fork(),i=this._dims.length;let r=0;return t.rem.length&&(this.remove(e,t,n),r|=(1<<i)-1),e.modified("query")&&!e.modified("fields")&&(r|=this.update(e,t,n)),t.add.length&&(this.insert(e,t,n),r|=(1<<i)-1),t.mod.length&&(this.modify(t,n),r|=(1<<i)-1),this.value.mask=r,n},insert(e,t,n){const i=t.add,r=this.value,s=this._dims,o=this._indices,a=e.fields,l={},u=n.add,c=r.size()+i.length,f=s.length;let d=r.size(),h,p,g;r.resize(c,f),r.add(i);const m=r.curr(),y=r.prev(),b=r.all();for(h=0;h<f;++h)p=a[h].fname,g=l[p]||(l[p]=o[p].insert(a[h],i,d)),s[h].onAdd(g,m);for(;d<c;++d)y[d]=b,m[d]!==b&&u.push(d)},modify(e,t){const n=t.mod,i=this.value,r=i.curr(),s=i.all(),o=e.mod;let a,l,u;for(a=0,l=o.length;a<l;++a)u=o[a]._index,r[u]!==s&&n.push(u)},remove(e,t,n){const i=this._indices,r=this.value,s=r.curr(),o=r.prev(),a=r.all(),l={},u=n.rem,c=t.rem;let f,d,h,p;for(f=0,d=c.length;f<d;++f)h=c[f]._index,l[h]=1,o[h]=p=s[h],s[h]=a,p!==a&&u.push(h);for(h in i)i[h].remove(d,l);return this.reindex(t,d,l),l},reindex(e,t,n){const i=this._indices,r=this.value;e.runAfter(()=>{const s=r.remove(t,n);for(const o in i)i[o].reindex(s)})},update(e,t,n){const i=this._dims,r=e.query,s=t.stamp,o=i.length;let a=0,l,u;for(n.filters=0,u=0;u<o;++u)e.modified("query",u)&&(l=u,++a);if(a===1)a=i[l].one,this.incrementOne(i[l],r[l],n.add,n.rem);else for(u=0,a=0;u<o;++u)e.modified("query",u)&&(a|=i[u].one,this.incrementAll(i[u],r[u],s,n.add),n.rem=n.add);return a},incrementAll(e,t,n,i){const r=this.value,s=r.seen(),o=r.curr(),a=r.prev(),l=e.index(),u=e.bisect(e.range),c=e.bisect(t),f=c[0],d=c[1],h=u[0],p=u[1],g=e.one;let m,y,b;if(f<h)for(m=f,y=Math.min(h,d);m<y;++m)b=l[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;else if(f>h)for(m=h,y=Math.min(f,p);m<y;++m)b=l[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;if(d>p)for(m=Math.max(f,p),y=d;m<y;++m)b=l[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;else if(d<p)for(m=Math.max(h,d),y=p;m<y;++m)b=l[m],s[b]!==n&&(a[b]=o[b],s[b]=n,i.push(b)),o[b]^=g;e.range=t.slice()},incrementOne(e,t,n,i){const r=this.value,s=r.curr(),o=e.index(),a=e.bisect(e.range),l=e.bisect(t),u=l[0],c=l[1],f=a[0],d=a[1],h=e.one;let p,g,m;if(u<f)for(p=u,g=Math.min(f,c);p<g;++p)m=o[p],s[m]^=h,n.push(m);else if(u>f)for(p=f,g=Math.min(u,d);p<g;++p)m=o[p],s[m]^=h,i.push(m);if(c>d)for(p=Math.max(u,d),g=c;p<g;++p)m=o[p],s[m]^=h,n.push(m);else if(c<d)for(p=Math.max(f,c),g=d;p<g;++p)m=o[p],s[m]^=h,i.push(m);e.range=t.slice()}});function Lx(e){I.call(this,null,e)}Lx.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:!0,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:!0,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]},K(Lx,I,{transform(e,t){const n=~(e.ignore||0),i=e.filter,r=i.mask;if(!(r&n))return t.StopPropagation;const s=t.fork(t.ALL),o=i.data(),a=i.curr(),l=i.prev(),u=c=>a[c]&n?null:o[c];return s.filter(s.MOD,u),r&r-1?(s.filter(s.ADD,c=>{const f=a[c]&n;return!f&&f^l[c]&n?o[c]:null}),s.filter(s.REM,c=>{const f=a[c]&n;return f&&!(f^(f^l[c]&n))?o[c]:null})):(s.filter(s.ADD,u),s.filter(s.REM,c=>(a[c]&n)===r?o[c]:null)),s.filter(s.SOURCE,c=>u(c._index))}});const uie=Object.freeze(Object.defineProperty({__proto__:null,crossfilter:Rx,resolvefilter:Lx},Symbol.toStringTag,{value:"Module"})),cie="RawCode",Ga="Literal",fie="Property",die="Identifier",hie="ArrayExpression",pie="BinaryExpression",CT="CallExpression",gie="ConditionalExpression",mie="LogicalExpression",yie="MemberExpression",bie="ObjectExpression",vie="UnaryExpression";function ur(e){this.type=e}ur.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=xie(this),n=0,i=t.length;n<i;++n)if(t[n].visit(e))return 1};function xie(e){switch(e.type){case hie:return e.elements;case pie:case mie:return[e.left,e.right];case CT:return[e.callee].concat(e.arguments);case gie:return[e.test,e.consequent,e.alternate];case yie:return[e.object,e.property];case bie:return e.properties;case fie:return[e.key,e.value];case vie:return[e.argument];case die:case Ga:case cie:default:return[]}}var Jr,fe,B,wn,st,T0=1,fd=2,Va=3,jo=4,M0=5,Xa=6,ti=7,dd=8,_ie=9;Jr={},Jr[T0]="Boolean",Jr[fd]="<end>",Jr[Va]="Identifier",Jr[jo]="Keyword",Jr[M0]="Null",Jr[Xa]="Numeric",Jr[ti]="Punctuator",Jr[dd]="String",Jr[_ie]="RegularExpression";var wie="ArrayExpression",kie="BinaryExpression",$ie="CallExpression",Eie="ConditionalExpression",ST="Identifier",Cie="Literal",Sie="LogicalExpression",Aie="MemberExpression",Tie="ObjectExpression",Mie="Property",Fie="UnaryExpression",Vt="Unexpected token %0",Die="Unexpected number",Nie="Unexpected string",Oie="Unexpected identifier",Rie="Unexpected reserved word",Lie="Unexpected end of input",Ix="Invalid regular expression",zx="Invalid regular expression: missing /",AT="Octal literals are not allowed in strict mode.",Iie="Duplicate data property in object literal not allowed in strict mode",on="ILLEGAL",hd="Disabled.",zie=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Pie=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function F0(e,t){if(!e)throw new Error("ASSERT: "+t)}function Is(e){return e>=48&&e<=57}function Px(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function pd(e){return"01234567".indexOf(e)>=0}function Bie(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function gd(e){return e===10||e===13||e===8232||e===8233}function md(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&zie.test(String.fromCharCode(e))}function D0(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&Pie.test(String.fromCharCode(e))}const jie={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function TT(){for(;B<wn;){const e=fe.charCodeAt(B);if(Bie(e)||gd(e))++B;else break}}function Bx(e){var t,n,i,r=0;for(n=e==="u"?4:2,t=0;t<n;++t)B<wn&&Px(fe[B])?(i=fe[B++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):Je({},Vt,on);return String.fromCharCode(r)}function Uie(){var e,t,n,i;for(e=fe[B],t=0,e==="}"&&Je({},Vt,on);B<wn&&(e=fe[B++],!!Px(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&Je({},Vt,on),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function MT(){var e,t;for(e=fe.charCodeAt(B++),t=String.fromCharCode(e),e===92&&(fe.charCodeAt(B)!==117&&Je({},Vt,on),++B,e=Bx("u"),(!e||e==="\\"||!md(e.charCodeAt(0)))&&Je({},Vt,on),t=e);B<wn&&(e=fe.charCodeAt(B),!!D0(e));)++B,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),fe.charCodeAt(B)!==117&&Je({},Vt,on),++B,e=Bx("u"),(!e||e==="\\"||!D0(e.charCodeAt(0)))&&Je({},Vt,on),t+=e);return t}function qie(){var e,t;for(e=B++;B<wn;){if(t=fe.charCodeAt(B),t===92)return B=e,MT();if(D0(t))++B;else break}return fe.slice(e,B)}function Wie(){var e,t,n;return e=B,t=fe.charCodeAt(B)===92?MT():qie(),t.length===1?n=Va:jie.hasOwnProperty(t)?n=jo:t==="null"?n=M0:t==="true"||t==="false"?n=T0:n=Va,{type:n,value:t,start:e,end:B}}function jx(){var e=B,t=fe.charCodeAt(B),n,i=fe[B],r,s,o;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++B,{type:ti,value:String.fromCharCode(t),start:e,end:B};default:if(n=fe.charCodeAt(B+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return B+=2,{type:ti,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:B};case 33:case 61:return B+=2,fe.charCodeAt(B)===61&&++B,{type:ti,value:fe.slice(e,B),start:e,end:B}}}if(o=fe.substr(B,4),o===">>>=")return B+=4,{type:ti,value:o,start:e,end:B};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return B+=3,{type:ti,value:s,start:e,end:B};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".indexOf(i)>=0||r==="=>")return B+=2,{type:ti,value:r,start:e,end:B};if(r==="//"&&Je({},Vt,on),"<>=!+-*%&|^/".indexOf(i)>=0)return++B,{type:ti,value:i,start:e,end:B};Je({},Vt,on)}function Hie(e){let t="";for(;B<wn&&Px(fe[B]);)t+=fe[B++];return t.length===0&&Je({},Vt,on),md(fe.charCodeAt(B))&&Je({},Vt,on),{type:Xa,value:parseInt("0x"+t,16),start:e,end:B}}function Gie(e){let t="0"+fe[B++];for(;B<wn&&pd(fe[B]);)t+=fe[B++];return(md(fe.charCodeAt(B))||Is(fe.charCodeAt(B)))&&Je({},Vt,on),{type:Xa,value:parseInt(t,8),octal:!0,start:e,end:B}}function FT(){var e,t,n;if(n=fe[B],F0(Is(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=B,e="",n!=="."){if(e=fe[B++],n=fe[B],e==="0"){if(n==="x"||n==="X")return++B,Hie(t);if(pd(n))return Gie(t);n&&Is(n.charCodeAt(0))&&Je({},Vt,on)}for(;Is(fe.charCodeAt(B));)e+=fe[B++];n=fe[B]}if(n==="."){for(e+=fe[B++];Is(fe.charCodeAt(B));)e+=fe[B++];n=fe[B]}if(n==="e"||n==="E")if(e+=fe[B++],n=fe[B],(n==="+"||n==="-")&&(e+=fe[B++]),Is(fe.charCodeAt(B)))for(;Is(fe.charCodeAt(B));)e+=fe[B++];else Je({},Vt,on);return md(fe.charCodeAt(B))&&Je({},Vt,on),{type:Xa,value:parseFloat(e),start:t,end:B}}function Vie(){var e="",t,n,i,r,s=!1;for(t=fe[B],F0(t==="'"||t==='"',"String literal must starts with a quote"),n=B,++B;B<wn;)if(i=fe[B++],i===t){t="";break}else if(i==="\\")if(i=fe[B++],!i||!gd(i.charCodeAt(0)))switch(i){case"u":case"x":fe[B]==="{"?(++B,e+=Uie()):e+=Bx(i);break;case"n":e+=`
|
|
68
|
+
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:pd(i)?(r="01234567".indexOf(i),r!==0&&(s=!0),B<wn&&pd(fe[B])&&(s=!0,r=r*8+"01234567".indexOf(fe[B++]),"0123".indexOf(i)>=0&&B<wn&&pd(fe[B])&&(r=r*8+"01234567".indexOf(fe[B++]))),e+=String.fromCharCode(r)):e+=i;break}else i==="\r"&&fe[B]===`
|
|
69
|
+
`&&++B;else{if(gd(i.charCodeAt(0)))break;e+=i}return t!==""&&Je({},Vt,on),{type:dd,value:e,octal:s,start:n,end:B}}function Xie(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";Je({},Ix)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Je({},Ix)}try{return new RegExp(e,t)}catch{return null}}function Yie(){var e,t,n,i,r;for(e=fe[B],F0(e==="/","Regular expression literal must start with a slash"),t=fe[B++],n=!1,i=!1;B<wn;)if(e=fe[B++],t+=e,e==="\\")e=fe[B++],gd(e.charCodeAt(0))&&Je({},zx),t+=e;else if(gd(e.charCodeAt(0)))Je({},zx);else if(n)e==="]"&&(n=!1);else if(e==="/"){i=!0;break}else e==="["&&(n=!0);return i||Je({},zx),r=t.substr(1,t.length-2),{value:r,literal:t}}function Zie(){var e,t,n;for(t="",n="";B<wn&&(e=fe[B],!!D0(e.charCodeAt(0)));)++B,e==="\\"&&B<wn?Je({},Vt,on):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Je({},Ix,n),{value:n,literal:t}}function Kie(){var e,t,n,i;return st=null,TT(),e=B,t=Yie(),n=Zie(),i=Xie(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:B}}function Jie(e){return e.type===Va||e.type===jo||e.type===T0||e.type===M0}function DT(){if(TT(),B>=wn)return{type:fd,start:B,end:B};const e=fe.charCodeAt(B);return md(e)?Wie():e===40||e===41||e===59?jx():e===39||e===34?Vie():e===46?Is(fe.charCodeAt(B+1))?FT():jx():Is(e)?FT():jx()}function ni(){const e=st;return B=e.end,st=DT(),B=e.end,e}function NT(){const e=B;st=DT(),B=e}function Qie(e){const t=new ur(wie);return t.elements=e,t}function OT(e,t,n){const i=new ur(e==="||"||e==="&&"?Sie:kie);return i.operator=e,i.left=t,i.right=n,i}function ere(e,t){const n=new ur($ie);return n.callee=e,n.arguments=t,n}function tre(e,t,n){const i=new ur(Eie);return i.test=e,i.consequent=t,i.alternate=n,i}function Ux(e){const t=new ur(ST);return t.name=e,t}function yd(e){const t=new ur(Cie);return t.value=e.value,t.raw=fe.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function RT(e,t,n){const i=new ur(Aie);return i.computed=e==="[",i.object=t,i.property=n,i.computed||(n.member=!0),i}function nre(e){const t=new ur(Tie);return t.properties=e,t}function LT(e,t,n){const i=new ur(Mie);return i.key=t,i.value=n,i.kind=e,i}function ire(e,t){const n=new ur(Fie);return n.operator=e,n.argument=t,n.prefix=!0,n}function Je(e,t){var n,i=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,(s,o)=>(F0(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=B,n.description=r,n}function N0(e){e.type===fd&&Je(e,Lie),e.type===Xa&&Je(e,Die),e.type===dd&&Je(e,Nie),e.type===Va&&Je(e,Oie),e.type===jo&&Je(e,Rie),Je(e,Vt,e.value)}function kn(e){const t=ni();(t.type!==ti||t.value!==e)&&N0(t)}function bt(e){return st.type===ti&&st.value===e}function qx(e){return st.type===jo&&st.value===e}function rre(){const e=[];for(B=st.start,kn("[");!bt("]");)bt(",")?(ni(),e.push(null)):(e.push(Ya()),bt("]")||kn(","));return ni(),Qie(e)}function IT(){B=st.start;const e=ni();return e.type===dd||e.type===Xa?(e.octal&&Je(e,AT),yd(e)):Ux(e.value)}function sre(){var e,t,n,i;if(B=st.start,e=st,e.type===Va)return n=IT(),kn(":"),i=Ya(),LT("init",n,i);if(e.type===fd||e.type===ti)N0(e);else return t=IT(),kn(":"),i=Ya(),LT("init",t,i)}function ore(){var e=[],t,n,i,r={},s=String;for(B=st.start,kn("{");!bt("}");)t=sre(),t.key.type===ST?n=t.key.name:n=s(t.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?Je({},Iie):r[i]=!0,e.push(t),bt("}")||kn(",");return kn("}"),nre(e)}function are(){kn("(");const e=Wx();return kn(")"),e}const lre={if:1};function ure(){var e,t,n;if(bt("("))return are();if(bt("["))return rre();if(bt("{"))return ore();if(e=st.type,B=st.start,e===Va||lre[st.value])n=Ux(ni().value);else if(e===dd||e===Xa)st.octal&&Je(st,AT),n=yd(ni());else{if(e===jo)throw new Error(hd);e===T0?(t=ni(),t.value=t.value==="true",n=yd(t)):e===M0?(t=ni(),t.value=null,n=yd(t)):bt("/")||bt("/=")?(n=yd(Kie()),NT()):N0(ni())}return n}function cre(){const e=[];if(kn("("),!bt(")"))for(;B<wn&&(e.push(Ya()),!bt(")"));)kn(",");return kn(")"),e}function fre(){B=st.start;const e=ni();return Jie(e)||N0(e),Ux(e.value)}function dre(){return kn("."),fre()}function hre(){kn("[");const e=Wx();return kn("]"),e}function pre(){var e,t,n;for(e=ure();;)if(bt("."))n=dre(),e=RT(".",e,n);else if(bt("("))t=cre(),e=ere(e,t);else if(bt("["))n=hre(),e=RT("[",e,n);else break;return e}function zT(){const e=pre();if(st.type===ti&&(bt("++")||bt("--")))throw new Error(hd);return e}function O0(){var e,t;if(st.type!==ti&&st.type!==jo)t=zT();else{if(bt("++")||bt("--"))throw new Error(hd);if(bt("+")||bt("-")||bt("~")||bt("!"))e=ni(),t=O0(),t=ire(e.value,t);else{if(qx("delete")||qx("void")||qx("typeof"))throw new Error(hd);t=zT()}}return t}function PT(e){let t=0;if(e.type!==ti&&e.type!==jo)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function gre(){var e,t,n,i,r,s,o,a,l,u;if(e=st,l=O0(),i=st,r=PT(i),r===0)return l;for(i.prec=r,ni(),t=[e,st],o=O0(),s=[l,i,o];(r=PT(st))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,l=s.pop(),t.pop(),n=OT(a,l,o),s.push(n);i=ni(),i.prec=r,s.push(i),t.push(st),n=O0(),s.push(n)}for(u=s.length-1,n=s[u],t.pop();u>1;)t.pop(),n=OT(s[u-1].value,s[u-2],n),u-=2;return n}function Ya(){var e,t,n;return e=gre(),bt("?")&&(ni(),t=Ya(),kn(":"),n=Ya(),e=tre(e,t,n)),e}function Wx(){const e=Ya();if(bt(","))throw new Error(hd);return e}function Hx(e){fe=e,B=0,wn=fe.length,st=null,NT();const t=Wx();if(st.type!==fd)throw new Error("Unexpect token after expression.");return t}var BT={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function jT(e){function t(o,a,l,u){let c=e(a[0]);return l&&(c=l+"("+c+")",l.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+o+(u<0?"":u===0?"()":"("+a.slice(1).map(e).join(",")+")")}function n(o,a,l){return u=>t(o,u,a,l)}const i="new Date",r="String",s="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(o){o.length<3&&U("Missing arguments to clamp function."),o.length>3&&U("Too many arguments to clamp function.");const a=o.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),regexp:s,test:n("test",s),if:function(o){o.length<3&&U("Missing arguments to if function."),o.length>3&&U("Too many arguments to if function.");const a=o.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function mre(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function UT(e){e=e||{};const t=e.allowed?Ki(e.allowed):{},n=e.forbidden?Ki(e.forbidden):{},i=e.constants||BT,r=(e.functions||jT)(f),s=e.globalvar,o=e.fieldvar,a=Me(s)?s:p=>`${s}["${p}"]`;let l={},u={},c=0;function f(p){if(te(p))return p;const g=d[p.type];return g==null&&U("Unsupported type: "+p.type),g(p)}const d={Literal:p=>p.raw,Identifier:p=>{const g=p.name;return c>0?g:pe(n,g)?U("Illegal identifier: "+g):pe(i,g)?i[g]:pe(t,g)?g:(l[g]=1,a(g))},MemberExpression:p=>{const g=!p.computed,m=f(p.object);g&&(c+=1);const y=f(p.property);return m===o&&(u[mre(y)]=1),g&&(c-=1),m+(g?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&U("Illegal callee type: "+p.callee.type);const g=p.callee.name,m=p.arguments,y=pe(r,g)&&r[g];return y||U("Unrecognized function: "+g),Me(y)?y(m):y+"("+m.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const g=f(p.key);return c-=1,g+":"+f(p.value)}};function h(p){const g={code:f(p),globals:Object.keys(l),fields:Object.keys(u)};return l={},u={},g}return h.functions=r,h.constants=i,h}const qT=Symbol("vega_selection_getter");function WT(e){return(!e.getter||!e.getter[qT])&&(e.getter=Ai(e.field),e.getter[qT]=!0),e.getter}const Gx="intersect",HT="union",yre="vlMulti",bre="vlPoint",GT="or",vre="and",Qr="_vgsid_",bd=Ai(Qr),xre="E",_re="R",wre="R-E",kre="R-LE",$re="R-RE",R0="index:unit";function VT(e,t){for(var n=t.fields,i=t.values,r=n.length,s=0,o,a;s<r;++s)if(a=n[s],o=WT(a)(e),oo(o)&&(o=hn(o)),oo(i[s])&&(i[s]=hn(i[s])),q(i[s])&&oo(i[s][0])&&(i[s]=i[s].map(hn)),a.type===xre){if(q(i[s])?i[s].indexOf(o)<0:o!==i[s])return!1}else if(a.type===_re){if(!Vl(o,i[s]))return!1}else if(a.type===$re){if(!Vl(o,i[s],!0,!1))return!1}else if(a.type===wre){if(!Vl(o,i[s],!1,!1))return!1}else if(a.type===kre&&!Vl(o,i[s],!1,!0))return!1;return!0}function Ere(e,t,n){for(var i=this.context.data[e],r=i?i.values.value:[],s=i?i[R0]&&i[R0].value:void 0,o=n===Gx,a=r.length,l=0,u,c,f,d,h;l<a;++l)if(u=r[l],s&&o){if(c=c||{},f=c[d=u.unit]||0,f===-1)continue;if(h=VT(t,u),c[d]=h?-1:++f,h&&s.size===1)return!0;if(!h&&f===s.get(d).count)return!1}else if(h=VT(t,u),o^h)return h;return a&&o}const XT=Xl(bd),Cre=XT.left,Sre=XT.right;function Are(e,t,n){const i=this.context.data[e],r=i?i.values.value:[],s=i?i[R0]&&i[R0].value:void 0,o=n===Gx,a=bd(t),l=Cre(r,a);if(l===r.length||bd(r[l])!==a)return!1;if(s&&o){if(s.size===1)return!0;if(Sre(r,a)-l<s.size)return!1}return!0}function Tre(e,t){return e.map(n=>Fe(t.fields?{values:t.fields.map(i=>WT(i)(n.datum))}:{[Qr]:bd(n.datum)},t))}function Mre(e,t,n,i){for(var r=this.context.data[e],s=r?r.values.value:[],o={},a={},l={},u,c,f,d,h,p,g,m,y,b,v=s.length,x=0,_,k;x<v;++x)if(u=s[x],d=u.unit,c=u.fields,f=u.values,c&&f){for(_=0,k=c.length;_<k;++_)h=c[_],g=o[h.field]||(o[h.field]={}),m=g[d]||(g[d]=[]),l[h.field]=y=h.type.charAt(0),b=Vx[`${y}_union`],g[d]=b(m,ee(f[_]));n&&(m=a[d]||(a[d]=[]),m.push(ee(f).reduce((w,$,S)=>(w[c[S].field]=$,w),{})))}else h=Qr,p=bd(u),g=o[h]||(o[h]={}),m=g[d]||(g[d]=[]),m.push(p),n&&(m=a[d]||(a[d]=[]),m.push({[Qr]:p}));if(t=t||HT,o[Qr]?o[Qr]=Vx[`${Qr}_${t}`](...Object.values(o[Qr])):Object.keys(o).forEach(w=>{o[w]=Object.keys(o[w]).map($=>o[w][$]).reduce(($,S)=>$===void 0?S:Vx[`${l[w]}_${t}`]($,S))}),s=Object.keys(a),n&&s.length){const w=i?bre:yre;o[w]=t===HT?{[GT]:s.reduce(($,S)=>($.push(...a[S]),$),[])}:{[vre]:s.map($=>({[GT]:a[$]}))}}return o}var Vx={[`${Qr}_union`]:PU,[`${Qr}_intersect`]:IU,E_union:function(e,t){if(!e.length)return t;for(var n=0,i=t.length;n<i;++n)e.indexOf(t[n])<0&&e.push(t[n]);return e},E_intersect:function(e,t){return e.length?e.filter(n=>t.indexOf(n)>=0):t},R_union:function(e,t){var n=hn(t[0]),i=hn(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]<i&&(e[1]=i),e):[n,i]},R_intersect:function(e,t){var n=hn(t[0]),i=hn(t[1]);return n>i&&(n=t[1],i=t[0]),e.length?i<e[0]||e[1]<n?[]:(e[0]<n&&(e[0]=n),e[1]>i&&(e[1]=i),e):[n,i]}};const Fre=":",Dre="@";function Xx(e,t,n,i){t[0].type!==Ga&&U("First argument to selection functions must be a string literal.");const r=t[0].value,s=t.length>=2&&Ue(t).value,o="unit",a=Dre+o,l=Fre+r;s===Gx&&!pe(i,a)&&(i[a]=n.getData(r).indataRef(n,o)),pe(i,l)||(i[l]=n.getData(r).tuplesRef())}function YT(e){const t=this.context.data[e];return t?t.values.value:[]}function Nre(e,t,n){const i=this.context.data[e]["index:"+t],r=i?i.value.get(n):void 0;return r&&r.count}function Ore(e,t){const n=this.context.dataflow,i=this.context.data[e],r=i.input;return n.pulse(r,n.changeset().remove(Ti).insert(t)),1}function Rre(e,t,n){if(e){const i=this.context.dataflow,r=e.mark.source;i.pulse(r,i.changeset().encode(e,t))}return n!==void 0?n:e}const vd=e=>function(t,n){return this.context.dataflow.locale()[e](n)(t)},Lre=vd("format"),ZT=vd("timeFormat"),Ire=vd("utcFormat"),zre=vd("timeParse"),Pre=vd("utcParse"),L0=new Date(2e3,0,1);function I0(e,t,n){return!Number.isInteger(e)||!Number.isInteger(t)?"":(L0.setYear(2e3),L0.setMonth(e),L0.setDate(t),ZT.call(this,L0,n))}function Bre(e){return I0.call(this,e,1,"%B")}function jre(e){return I0.call(this,e,1,"%b")}function Ure(e){return I0.call(this,0,2+e,"%A")}function qre(e){return I0.call(this,0,2+e,"%a")}const Wre=":",Hre="@",Yx="%",KT="$";function Zx(e,t,n,i){t[0].type!==Ga&&U("First argument to data functions must be a string literal.");const r=t[0].value,s=Wre+r;if(!pe(s,i))try{i[s]=n.getData(r).tuplesRef()}catch{}}function Gre(e,t,n,i){t[0].type!==Ga&&U("First argument to indata must be a string literal."),t[1].type!==Ga&&U("Second argument to indata must be a string literal.");const r=t[0].value,s=t[1].value,o=Hre+s;pe(o,i)||(i[o]=n.getData(r).indataRef(n,s))}function Bn(e,t,n,i){if(t[0].type===Ga)JT(n,i,t[0].value);else for(e in n.scales)JT(n,i,e)}function JT(e,t,n){const i=Yx+n;if(!pe(t,i))try{t[i]=e.scaleRef(n)}catch{}}function es(e,t){if(Me(e))return e;if(te(e)){const n=t.scales[e];return n&&lX(n.value)?n.value:void 0}}function Vre(e,t,n){t.__bandwidth=r=>r&&r.bandwidth?r.bandwidth():0,n._bandwidth=Bn,n._range=Bn,n._scale=Bn;const i=r=>"_["+(r.type===Ga?J(Yx+r.value):J(Yx)+"+"+e(r))+"]";return{_bandwidth:r=>`this.__bandwidth(${i(r[0])})`,_range:r=>`${i(r[0])}.range()`,_scale:r=>`${i(r[0])}(${e(r[1])})`}}function Kx(e,t){return function(n,i,r){if(n){const s=es(n,(r||this).context);return s&&s.path[e](i)}else return t(i)}}const Xre=Kx("area",yJ),Yre=Kx("bounds",_J),Zre=Kx("centroid",SJ);function Kre(e,t){const n=es(e,(t||this).context);return n&&n.scale()}function Jre(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n}function Jx(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(i){e.warn(i)}return n[n.length-1]}function Qre(){return Jx(this.context.dataflow,"warn",arguments)}function ese(){return Jx(this.context.dataflow,"info",arguments)}function tse(){return Jx(this.context.dataflow,"debug",arguments)}function Qx(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function e7(e){const t=vo(e),n=Qx(t.r),i=Qx(t.g),r=Qx(t.b);return .2126*n+.7152*i+.0722*r}function nse(e,t){const n=e7(e),i=e7(t),r=Math.max(n,i),s=Math.min(n,i);return(r+.05)/(s+.05)}function ise(){const e=[].slice.call(arguments);return e.unshift({}),Fe(...e)}function QT(e,t){return e===t||e!==e&&t!==t?!0:q(e)?q(t)&&e.length===t.length?rse(e,t):!1:ie(e)&&ie(t)?eM(e,t):!1}function rse(e,t){for(let n=0,i=e.length;n<i;++n)if(!QT(e[n],t[n]))return!1;return!0}function eM(e,t){for(const n in e)if(!QT(e[n],t[n]))return!1;return!0}function tM(e){return t=>eM(e,t)}function sse(e,t,n,i,r,s){const o=this.context.dataflow,a=this.context.data[e],l=a.input,u=o.stamp();let c=a.changes,f,d;if(o._trigger===!1||!(l.value.length||t||i))return 0;if((!c||c.stamp<u)&&(a.changes=c=o.changeset(),c.stamp=u,o.runAfter(()=>{a.modified=!0,o.pulse(l,c).run()},!0,1)),n&&(f=n===!0?Ti:q(n)||ip(n)?n:tM(n),c.remove(f)),t&&c.insert(t),i&&(f=tM(i),l.value.some(f)?c.remove(f):c.insert(i)),r)for(d in s)c.modify(r,d,s[d]);return 1}function ose(e){const t=e.touches,n=t[0].clientX-t[1].clientX,i=t[0].clientY-t[1].clientY;return Math.hypot(n,i)}function ase(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)}const nM={};function lse(e,t){const n=nM[t]||(nM[t]=Ai(t));return q(e)?e.map(n):n(e)}function t7(e){return q(e)||ArrayBuffer.isView(e)?e:null}function n7(e){return t7(e)||(te(e)?e:null)}function use(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return t7(e).join(...n)}function cse(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n7(e).indexOf(...n)}function fse(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n7(e).lastIndexOf(...n)}function dse(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n7(e).slice(...n)}function hse(e,t,n){return Me(n)&&U("Function argument passed to replace."),String(e).replace(t,n)}function pse(e){return t7(e).slice().reverse()}function gse(e,t,n){return Tb(e||0,t||0,n||0)}function mse(e,t){const n=es(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0}function yse(e,t){const n=es(e,(t||this).context);return n?n.copy():void 0}function bse(e,t){const n=es(e,(t||this).context);return n?n.domain():[]}function vse(e,t,n){const i=es(e,(n||this).context);return i?q(t)?(i.invertRange||i.invert)(t):(i.invert||i.invertExtent)(t):void 0}function xse(e,t){const n=es(e,(t||this).context);return n&&n.range?n.range():[]}function _se(e,t,n){const i=es(e,(n||this).context);return i?i(t):void 0}function wse(e,t,n,i,r){e=es(e,(r||this).context);const s=Z$(t,n);let o=e.domain(),a=o[0],l=Ue(o),u=dn;return l-a?u=R$(e,a,l):e=(e.interpolator?Ke("sequential")().interpolator(e.interpolator()):Ke("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,l=1]),e.ticks&&(o=e.ticks(+i||15),a!==o[0]&&o.unshift(a),l!==Ue(o)&&o.push(l)),o.forEach(c=>s.stop(u(c),e(c))),s}function kse(e,t,n){const i=es(e,(n||this).context);return function(r){return i?i.path.context(r)(t):""}}function $se(e){let t=null;return function(n){return n?vf(n,t=t||bu(e)):e}}const iM=e=>e.data;function rM(e,t){const n=YT.call(t,e);return n.root&&n.root.lookup||{}}function Ese(e,t,n){const i=rM(e,this),r=i[t],s=i[n];return r&&s?r.path(s).map(iM):void 0}function Cse(e,t){const n=rM(e,this)[t];return n?n.ancestors().map(iM):void 0}const sM=()=>typeof window<"u"&&window||null;function Sse(){const e=sM();return e?e.screen:{}}function Ase(){const e=sM();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]}function Tse(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]}function oM(e,t,n){if(!e)return[];const[i,r]=e,s=new Ot().set(i[0],i[1],r[0],r[1]),o=n||this.context.dataflow.scenegraph().root;return pC(o,s,Mse(t))}function Mse(e){let t=null;if(e){const n=ee(e.marktype),i=ee(e.markname);t=r=>(!n.length||n.some(s=>r.marktype===s))&&(!i.length||i.some(s=>r.name===s))}return t}function Fse(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;e=ee(e);const r=e[e.length-1];return r===void 0||Math.hypot(r[0]-t,r[1]-n)>i?[...e,[t,n]]:e}function Dse(e){return ee(e).reduce((t,n,i)=>{let[r,s]=n;return t+=i==0?`M ${r},${s} `:i===e.length-1?" Z":`L ${r},${s} `},"")}function Nse(e,t,n){const{x:i,y:r,mark:s}=n,o=new Ot().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[l,u]of t)l<o.x1&&(o.x1=l),l>o.x2&&(o.x2=l),u<o.y1&&(o.y1=u),u>o.y2&&(o.y2=u);return o.translate(i,r),oM([[o.x1,o.y1],[o.x2,o.y2]],e,s).filter(l=>Ose(l.x,l.y,t))}function Ose(e,t,n){let i=0;for(let r=0,s=n.length-1;r<n.length;s=r++){const[o,a]=n[s],[l,u]=n[r];u>t!=a>t&&e<(o-l)*(t-u)/(a-u)+l&&i++}return i&1}const xd={random(){return Di()},cumulativeNormal:fp,cumulativeLogNormal:uy,cumulativeUniform:hy,densityNormal:ry,densityLogNormal:ly,densityUniform:dy,quantileNormal:dp,quantileLogNormal:cy,quantileUniform:py,sampleNormal:cp,sampleLogNormal:ay,sampleUniform:fy,isArray:q,isBoolean:so,isDate:oo,isDefined(e){return e!==void 0},isNumber:Xe,isObject:ie,isRegExp:a4,isString:te,isTuple:ip,isValid(e){return e!=null&&e===e},toBoolean:h2,toDate(e){return p2(e)},toNumber:hn,toString:g2,indexof:cse,join:use,lastindexof:fse,replace:hse,reverse:pse,slice:dse,flush:s4,lerp:l4,merge:ise,pad:f4,peek:Ue,pluck:lse,span:Lc,inrange:Vl,truncate:d4,rgb:vo,lab:Fp,hcl:Dp,hsl:Ap,luminance:e7,contrast:nse,sequence:hi,format:Lre,utcFormat:Ire,utcParse:Pre,utcOffset:t8,utcSequence:r8,timeFormat:ZT,timeParse:zre,timeOffset:e8,timeSequence:i8,timeUnitSpecifier:q4,monthFormat:Bre,monthAbbrevFormat:jre,dayFormat:Ure,dayAbbrevFormat:qre,quarter:t4,utcquarter:n4,week:H4,utcweek:X4,dayofyear:W4,utcdayofyear:V4,warn:Qre,info:ese,debug:tse,extent(e){return Rr(e)},inScope:Jre,intersect:oM,clampRange:i4,pinchDistance:ose,pinchAngle:ase,screen:Sse,containerSize:Tse,windowSize:Ase,bandspace:gse,setdata:Ore,pathShape:$se,panLinear:K6,panLog:J6,panPow:Q6,panSymlog:e4,zoomLinear:a2,zoomLog:l2,zoomPow:Rh,zoomSymlog:u2,encode:Rre,modify:sse,lassoAppend:Fse,lassoPath:Dse,intersectLasso:Nse},Rse=["view","item","group","xy","x","y"],Lse="event.vega.",aM="this.",i7={},lM={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${J(KT+e)}]`,functions:Ise,constants:BT,visitors:i7},r7=UT(lM);function Ise(e){const t=jT(e);Rse.forEach(n=>t[n]=Lse+n);for(const n in xd)t[n]=aM+n;return Fe(t,Vre(e,xd,i7)),t}function Ft(e,t,n){return arguments.length===1?xd[e]:(xd[e]=t,n&&(i7[e]=n),r7&&(r7.functions[e]=aM+e),this)}Ft("bandwidth",mse,Bn),Ft("copy",yse,Bn),Ft("domain",bse,Bn),Ft("range",xse,Bn),Ft("invert",vse,Bn),Ft("scale",_se,Bn),Ft("gradient",wse,Bn),Ft("geoArea",Xre,Bn),Ft("geoBounds",Yre,Bn),Ft("geoCentroid",Zre,Bn),Ft("geoShape",kse,Bn),Ft("geoScale",Kre,Bn),Ft("indata",Nre,Gre),Ft("data",YT,Zx),Ft("treePath",Ese,Zx),Ft("treeAncestors",Cse,Zx),Ft("vlSelectionTest",Ere,Xx),Ft("vlSelectionIdTest",Are,Xx),Ft("vlSelectionResolve",Mre,Xx),Ft("vlSelectionTuples",Tre);function ts(e,t){const n={};let i;try{e=te(e)?e:J(e)+"",i=Hx(e)}catch{U("Expression parse error: "+e)}i.visit(s=>{if(s.type!==CT)return;const o=s.callee.name,a=lM.visitors[o];a&&a(o,s.arguments,t,n)});const r=r7(i);return r.globals.forEach(s=>{const o=KT+s;!pe(n,o)&&t.getSignal(s)&&(n[o]=t.signalRef(s))}),{$expr:Fe({code:r.code},t.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}function zse(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach(i=>t.parseOperator(i)),n.forEach(i=>t.parseOperatorParameters(i)),(e.streams||[]).forEach(i=>t.parseStream(i)),(e.updates||[]).forEach(i=>t.parseUpdate(i)),t.resolve()}const Pse=Ki(["rule"]),uM=Ki(["group","image","rect"]);function Bse(e,t){let n="";return Pse[t]||(e.x2&&(e.x?(uM[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(uM[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}function s7(e){return(e+"").toLowerCase()}function jse(e){return s7(e)==="operator"}function Use(e){return s7(e)==="collect"}function _d(e,t,n){n.endsWith(";")||(n="return("+n+");");const i=Function(...t.concat(n));return e&&e.functions?i.bind(e.functions):i}function qse(e,t,n,i){return`((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${n}
|
|
70
|
+
: (u > v || v == null) && u != null ? ${i}
|
|
71
|
+
: ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}
|
|
72
|
+
: v !== v && u === u ? ${i} : `}var Wse={operator:(e,t)=>_d(e,["_"],t.code),parameter:(e,t)=>_d(e,["datum","_"],t.code),event:(e,t)=>_d(e,["event"],t.code),handler:(e,t)=>{const n=`var datum=event.item&&event.item.datum;return ${t.code};`;return _d(e,["_","event"],n)},encode:(e,t)=>{const{marktype:n,channels:i}=t;let r="var o=item,datum=o.datum,m=0,$;";for(const s in i){const o="o["+J(s)+"]";r+=`$=${i[s].code};if(${o}!==$)${o}=$,m=1;`}return r+=Bse(i,n),r+="return m;",_d(e,["item","_"],r)},codegen:{get(e){const t=`[${e.map(J).join("][")}]`,n=Function("_",`return _${t};`);return n.path=t,n},comparator(e,t){let n;const i=(s,o)=>{const a=t[o];let l,u;return s.path?(l=`a${s.path}`,u=`b${s.path}`):((n=n||{})["f"+o]=s,l=`this.f${o}(a)`,u=`this.f${o}(b)`),qse(l,u,-a,a)},r=Function("a","b","var u, v; return "+e.map(i).join("")+"0;");return n?r.bind(n):r}}};function Hse(e){const t=this;jse(e.type)||!e.type?t.operator(e,e.update?t.operatorExpression(e.update):null):t.transform(e,e.type)}function Gse(e){const t=this;if(e.params){const n=t.get(e.id);n||U("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}}function Vse(e,t){t=t||{};const n=this;for(const i in e){const r=e[i];t[i]=q(r)?r.map(s=>cM(s,n,t)):cM(r,n,t)}return t}function cM(e,t,n){if(!e||!ie(e))return e;for(let i=0,r=fM.length,s;i<r;++i)if(s=fM[i],pe(e,s.key))return s.parse(e,t,n);return e}var fM=[{key:"$ref",parse:Xse},{key:"$key",parse:Zse},{key:"$expr",parse:Yse},{key:"$field",parse:Kse},{key:"$encode",parse:Qse},{key:"$compare",parse:Jse},{key:"$context",parse:eoe},{key:"$subflow",parse:toe},{key:"$tupleid",parse:noe}];function Xse(e,t){return t.get(e.$ref)||U("Operator not defined: "+e.$ref)}function Yse(e,t,n){e.$params&&t.parseParameters(e.$params,n);const i="e:"+e.$expr.code;return t.fn[i]||(t.fn[i]=Xn(t.parameterExpression(e.$expr),e.$fields))}function Zse(e,t){const n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=d2(e.$key,e.$flat,t.expr.codegen))}function Kse(e,t){if(!e.$field)return null;const n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=Ai(e.$field,e.$name,t.expr.codegen))}function Jse(e,t){const n="c:"+e.$compare+"_"+e.$order,i=ee(e.$compare).map(r=>r&&r.$tupleid?ge:r);return t.fn[n]||(t.fn[n]=c2(i,e.$order,t.expr.codegen))}function Qse(e,t){const n=e.$encode,i={};for(const r in n){const s=n[r];i[r]=Xn(t.encodeExpression(s.$expr),s.$fields),i[r].output=s.$output}return i}function eoe(e,t){return t}function toe(e,t){const n=e.$subflow;return function(i,r,s){const o=t.fork().parse(n),a=o.get(n.operators[0].id),l=o.signals.parent;return l&&l.set(s),a.detachSubflow=()=>t.detach(o),a}}function noe(){return ge}function ioe(e){var t=this,n=e.filter!=null?t.eventExpression(e.filter):void 0,i=e.stream!=null?t.get(e.stream):void 0,r;e.source?i=t.events(e.source,e.type,n):e.merge&&(r=e.merge.map(s=>t.get(s)),i=r[0].merge.apply(r[0],r.slice(1))),e.between&&(r=e.between.map(s=>t.get(s)),i=i.between(r[0],r[1])),e.filter&&(i=i.filter(n)),e.throttle!=null&&(i=i.throttle(+e.throttle)),e.debounce!=null&&(i=i.debounce(+e.debounce)),i==null&&U("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),t.stream(e,i)}function roe(e){var t=this,n=ie(n=e.source)?n.$ref:n,i=t.get(n),r=null,s=e.update,o=void 0;i||U("Source not defined: "+e.source),r=e.target&&e.target.$expr?t.eventExpression(e.target.$expr):t.get(e.target),s&&s.$expr&&(s.$params&&(o=t.parseParameters(s.$params)),s=t.handlerExpression(s.$expr)),t.update(e,i,r,s,o)}const soe={skip:!0};function ooe(e){var t=this,n={};if(e.signals){var i=n.signals={};Object.keys(t.signals).forEach(s=>{const o=t.signals[s];e.signals(s,o)&&(i[s]=o.value)})}if(e.data){var r=n.data={};Object.keys(t.data).forEach(s=>{const o=t.data[s];e.data(s,o)&&(r[s]=o.input.value)})}return t.subcontext&&e.recurse!==!1&&(n.subcontext=t.subcontext.map(s=>s.getState(e))),n}function aoe(e){var t=this,n=t.dataflow,i=e.data,r=e.signals;Object.keys(r||{}).forEach(s=>{n.update(t.signals[s],r[s],soe)}),Object.keys(i||{}).forEach(s=>{n.pulse(t.data[s].input,n.changeset().remove(Ti).insert(i[s]))}),(e.subcontext||[]).forEach((s,o)=>{const a=t.subcontext[o];a&&a.setState(s)})}function dM(e,t,n,i){return new hM(e,t,n,i)}function hM(e,t,n,i){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=i||Wse,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function pM(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}hM.prototype=pM.prototype={fork(){const e=new pM(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter(n=>n!==e);const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,i=n.dataflow,r=e.value;if(n.set(e.id,t),Use(e.type)&&r&&(r.$ingest?i.ingest(t,r.$ingest,r.$format):r.$request?i.preload(t,r.$request,r.$format):i.pulse(t,i.changeset().insert(r))),e.root&&(n.root=t),e.parent){let s=n.get(e.parent.$ref);s?(i.connect(s,[t]),t.targets().add(s)):(n.unresolved=n.unresolved||[]).push(()=>{s=n.get(e.parent.$ref),i.connect(s,[t]),t.targets().add(s)})}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const s in e.data){const o=n.data[s]||(n.data[s]={});e.data[s].forEach(a=>o[a]=t)}},resolve(){return(this.unresolved||[]).forEach(e=>e()),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[s7(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,i,r){this.dataflow.on(t,n,i,r,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:zse,parseOperator:Hse,parseOperatorParameters:Gse,parseParameters:Vse,parseStream:ioe,parseUpdate:roe,getState:ooe,setState:aoe};function loe(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),gM(t,e.description()))}function gM(e,t){e&&(t==null?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}function uoe(e){e.add(null,t=>(e._background=t.bg,e._resize=1,t.bg),{bg:e._signals.background})}const o7="default";function coe(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:o7,item:null}));e.on(e.events("view","mousemove"),t,(n,i)=>{const r=t.value,s=r?te(r)?r:r.user:o7,o=i.item&&i.item.cursor||null;return r&&s===r.user&&o==r.item?r:{user:s,item:o}}),e.add(null,function(n){let i=n.cursor,r=this.value;return te(i)||(r=i.item,i=i.user),a7(e,i&&i!==o7?i:r||i),r},{cursor:t})}function a7(e,t){const n=e.globalCursor()?typeof document<"u"&&document.body:e.container();if(n)return t==null?n.style.removeProperty("cursor"):n.style.cursor=t}function z0(e,t){var n=e._runtime.data;return pe(n,t)||U("Unrecognized data set: "+t),n[t]}function foe(e,t){return arguments.length<2?z0(this,e).values.value:P0.call(this,e,_a().remove(Ti).insert(t))}function P0(e,t){G8(t)||U("Second argument to changes must be a changeset.");const n=z0(this,e);return n.modified=!0,this.pulse(n.input,t)}function doe(e,t){return P0.call(this,e,_a().insert(t))}function hoe(e,t){return P0.call(this,e,_a().remove(t))}function mM(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function yM(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function B0(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function poe(e){var t=B0(e),n=mM(e),i=yM(e);e._renderer.background(e.background()),e._renderer.resize(n,i,t),e._handler.origin(t),e._resizeListeners.forEach(r=>{try{r(n,i)}catch(s){e.error(s)}})}function goe(e,t,n){var i=e._renderer,r=i&&i.canvas(),s,o,a;return r&&(a=B0(e),o=t.changedTouches?t.changedTouches[0]:t,s=fg(o,r),s[0]-=a[0],s[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=moe(e,n,s),t}function moe(e,t,n){const i=t?t.mark.marktype==="group"?t:t.mark.group:null;function r(o){var a=i,l;if(o){for(l=t;l;l=l.mark.group)if(l.mark.name===o){a=l;break}}return a&&a.mark&&a.mark.interactive?a:{}}function s(o){if(!o)return n;te(o)&&(o=r(o));const a=n.slice();for(;o;)a[0]-=o.x||0,a[1]-=o.y||0,o=o.mark&&o.mark.group;return a}return{view:pn(e),item:pn(t||{}),group:r,xy:s,x:o=>s(o)[0],y:o=>s(o)[1]}}const bM="view",yoe="timer",boe="window",voe={trap:!1};function xoe(e){const t=Fe({defaults:{}},e),n=(i,r)=>{r.forEach(s=>{q(i[s])&&(i[s]=Ki(i[s]))})};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}function vM(e,t,n,i){e._eventListeners.push({type:n,sources:ee(t),handler:i})}function _oe(e,t){var n=e._eventConfig.defaults,i=n.prevent,r=n.allow;return i===!1||r===!0?!1:i===!0||r===!1?!0:i?i[t]:r?!r[t]:e.preventDefault()}function j0(e,t,n){const i=e._eventConfig&&e._eventConfig[t];return i===!1||ie(i)&&!i[n]?(e.warn(`Blocked ${t} ${n} event listener.`),!1):!0}function woe(e,t,n){var i=this,r=new ap(n),s=function(u,c){i.runAsync(null,()=>{e===bM&&_oe(i,t)&&u.preventDefault(),r.receive(goe(i,u,c))})},o;if(e===yoe)j0(i,"timer",t)&&i.timer(s,t);else if(e===bM)j0(i,"view",t)&&i.addEventListener(t,s,voe);else if(e===boe?j0(i,"window",t)&&typeof window<"u"&&(o=[window]):typeof document<"u"&&j0(i,"selector",t)&&(o=Array.from(document.querySelectorAll(e))),!o)i.warn("Can not resolve event source: "+e);else{for(var a=0,l=o.length;a<l;++a)o[a].addEventListener(t,s);vM(i,o,t,s)}return r}function xM(e){return e.item}function _M(e){return e.item.mark.source}function wM(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function koe(e,t){return e=[e||"hover"],t=[t||"update",e[0]],this.on(this.events("view","mouseover",xM),_M,wM(e)),this.on(this.events("view","mouseout",xM),_M,wM(t)),this}function $oe(){var e=this._tooltip,t=this._timers,n=this._eventListeners,i,r,s;for(i=t.length;--i>=0;)t[i].stop();for(i=n.length;--i>=0;)for(s=n[i],r=s.sources.length;--r>=0;)s.sources[r].removeEventListener(s.type,s.handler);return e&&e.call(this,this._handler,null,null,null),this}function _i(e,t,n){const i=document.createElement(e);for(const r in t)i.setAttribute(r,t[r]);return n!=null&&(i.textContent=n),i}const Eoe="vega-bind",Coe="vega-bind-name",Soe="vega-bind-radio";function Aoe(e,t,n){if(!t)return;const i=n.param;let r=n.state;return r||(r=n.state={elements:null,active:!1,set:null,update:o=>{o!=e.signal(i.signal)&&e.runAsync(null,()=>{r.source=!0,e.signal(i.signal,o)})}},i.debounce&&(r.update=f2(i.debounce,r.update))),(i.input==null&&i.element?Toe:Foe)(r,t,i,e),r.active||(e.on(e._signals[i.signal],null,()=>{r.source?r.source=!1:r.set(e.signal(i.signal))}),r.active=!0),r}function Toe(e,t,n,i){const r=n.event||"input",s=()=>e.update(t.value);i.signal(n.signal,t.value),t.addEventListener(r,s),vM(i,t,r,s),e.set=o=>{t.value=o,t.dispatchEvent(Moe(r))}}function Moe(e){return typeof Event<"u"?new Event(e):{type:e}}function Foe(e,t,n,i){const r=i.signal(n.signal),s=_i("div",{class:Eoe}),o=n.input==="radio"?s:s.appendChild(_i("label"));o.appendChild(_i("span",{class:Coe},n.name||n.signal)),t.appendChild(s);let a=Doe;switch(n.input){case"checkbox":a=Noe;break;case"select":a=Ooe;break;case"radio":a=Roe;break;case"range":a=Loe;break}a(e,o,n,r)}function Doe(e,t,n,i){const r=_i("input");for(const s in n)s!=="signal"&&s!=="element"&&r.setAttribute(s==="input"?"type":s,n[s]);r.setAttribute("name",n.signal),r.value=i,t.appendChild(r),r.addEventListener("input",()=>e.update(r.value)),e.elements=[r],e.set=s=>r.value=s}function Noe(e,t,n,i){const r={type:"checkbox",name:n.signal};i&&(r.checked=!0);const s=_i("input",r);t.appendChild(s),s.addEventListener("change",()=>e.update(s.checked)),e.elements=[s],e.set=o=>s.checked=!!o||null}function Ooe(e,t,n,i){const r=_i("select",{name:n.signal}),s=n.labels||[];n.options.forEach((o,a)=>{const l={value:o};U0(o,i)&&(l.selected=!0),r.appendChild(_i("option",l,(s[a]||o)+""))}),t.appendChild(r),r.addEventListener("change",()=>{e.update(n.options[r.selectedIndex])}),e.elements=[r],e.set=o=>{for(let a=0,l=n.options.length;a<l;++a)if(U0(n.options[a],o)){r.selectedIndex=a;return}}}function Roe(e,t,n,i){const r=_i("span",{class:Soe}),s=n.labels||[];t.appendChild(r),e.elements=n.options.map((o,a)=>{const l={type:"radio",name:n.signal,value:o};U0(o,i)&&(l.checked=!0);const u=_i("input",l);u.addEventListener("change",()=>e.update(o));const c=_i("label",{},(s[a]||o)+"");return c.prepend(u),r.appendChild(c),u}),e.set=o=>{const a=e.elements,l=a.length;for(let u=0;u<l;++u)U0(a[u].value,o)&&(a[u].checked=!0)}}function Loe(e,t,n,i){i=i!==void 0?i:(+n.max+ +n.min)/2;const r=n.max!=null?n.max:Math.max(100,+i)||100,s=n.min||Math.min(0,r,+i)||0,o=n.step||lo(s,r,100),a=_i("input",{type:"range",name:n.signal,min:s,max:r,step:o});a.value=i;const l=_i("span",{},+i);t.appendChild(a),t.appendChild(l);const u=()=>{l.textContent=a.value,e.update(+a.value)};a.addEventListener("input",u),a.addEventListener("change",u),e.elements=[a],e.set=c=>{a.value=c,l.textContent=c}}function U0(e,t){return e===t||e+""==t+""}function kM(e,t,n,i,r,s){return t=t||new i(e.loader()),t.initialize(n,mM(e),yM(e),B0(e),r,s).background(e.background())}function l7(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null}function Ioe(e,t,n,i){const r=new i(e.loader(),l7(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,B0(e),e);return t&&t.handlers().forEach(s=>{r.on(s.type,s.handler)}),r}function zoe(e,t){const n=this,i=n._renderType,r=n._eventConfig.bind,s=kg(i);e=n._el=e?u7(n,e,!0):null,loe(n),s||n.error("Unrecognized renderer type: "+i);const o=s.handler||Mo,a=e?s.renderer:s.headless;return n._renderer=a?kM(n,n._renderer,e,a):null,n._handler=Ioe(n,n._handler,e,o),n._redraw=!0,e&&r!=="none"&&(t=t?n._elBind=u7(n,t,!0):e.appendChild(_i("form",{class:"vega-bindings"})),n._bind.forEach(l=>{l.param.element&&r!=="container"&&(l.element=u7(n,l.param.element,!!l.param.input))}),n._bind.forEach(l=>{Aoe(n,l.element||t,l)})),n}function u7(e,t,n){if(typeof t=="string")if(typeof document<"u"){if(t=document.querySelector(t),!t)return e.error("Signal bind element not found: "+t),null}else return e.error("DOM document instance not found."),null;if(t&&n)try{t.textContent=""}catch(i){t=null,e.error(i)}return t}const wd=e=>+e||0,Poe=e=>({top:e,bottom:e,left:e,right:e});function $M(e){return ie(e)?{top:wd(e.top),bottom:wd(e.bottom),left:wd(e.left),right:wd(e.right)}:Poe(wd(e))}async function c7(e,t,n,i){const r=kg(t),s=r&&r.headless;return s||U("Unrecognized renderer type: "+t),await e.runAsync(),kM(e,null,null,s,n,i).renderAsync(e._scenegraph.root)}async function Boe(e,t){e!==Do.Canvas&&e!==Do.SVG&&e!==Do.PNG&&U("Unrecognized image type: "+e);const n=await c7(this,e,t);return e===Do.SVG?joe(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")}function joe(e,t){const n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}async function Uoe(e,t){return(await c7(this,Do.Canvas,e,t)).canvas()}async function qoe(e){return(await c7(this,Do.SVG,e)).svg()}function Woe(e,t,n){return dM(e,au,xd,n).parse(t)}function Hoe(e){var t=this._runtime.scales;return pe(t,e)||U("Unrecognized scale or projection: "+e),t[e].value}var EM="width",CM="height",f7="padding",SM={skip:!0};function AM(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===f7?i.left+i.right:0)}function TM(e,t){var n=e.autosize(),i=e.padding();return t-(n&&n.contains===f7?i.top+i.bottom:0)}function Goe(e){var t=e._signals,n=t[EM],i=t[CM],r=t[f7];function s(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,a=>{e._width=a.size,e._viewWidth=AM(e,a.size),s()},{size:n}),e._resizeHeight=e.add(null,a=>{e._height=a.size,e._viewHeight=TM(e,a.size),s()},{size:i});const o=e.add(null,s,{pad:r});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=i.rank+1,o.rank=r.rank+1}function Voe(e,t,n,i,r,s){this.runAfter(o=>{let a=0;o._autosize=0,o.width()!==n&&(a=1,o.signal(EM,n,SM),o._resizeWidth.skip(!0)),o.height()!==i&&(a=1,o.signal(CM,i,SM),o._resizeHeight.skip(!0)),o._viewWidth!==e&&(o._resize=1,o._viewWidth=e),o._viewHeight!==t&&(o._resize=1,o._viewHeight=t),(o._origin[0]!==r[0]||o._origin[1]!==r[1])&&(o._resize=1,o._origin=r),a&&o.run("enter"),s&&o.runAfter(l=>l.resize())},!1,1)}function Xoe(e){return this._runtime.getState(e||{data:Yoe,signals:Zoe,recurse:!0})}function Yoe(e,t){return t.modified&&q(t.input.value)&&e.indexOf("_:vega:_")}function Zoe(e,t){return!(e==="parent"||t instanceof au.proxy)}function Koe(e){return this.runAsync(null,t=>{t._trigger=!1,t._runtime.setState(e)},t=>{t._trigger=!0}),this}function Joe(e,t){function n(i){e({timestamp:Date.now(),elapsed:i})}this._timers.push(Tee(n,t))}function Qoe(e,t,n,i){const r=e.element();r&&r.setAttribute("title",eae(i))}function eae(e){return e==null?"":q(e)?MM(e):ie(e)&&!oo(e)?tae(e):e+""}function tae(e){return Object.keys(e).map(t=>{const n=e[t];return t+": "+(q(n)?MM(n):FM(n))}).join(`
|
|
73
|
+
`)}function MM(e){return"["+e.map(FM).join(", ")+"]"}function FM(e){return q(e)?"[…]":ie(e)&&!oo(e)?"{…}":e}function DM(e,t){const n=this;if(t=t||{},ou.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),t.logLevel!=null&&n.logLevel(t.logLevel),t.locale||e.locale){const s=Fe({},e.locale,t.locale);n.locale(O8(s.number,s.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||Do.Canvas,n._scenegraph=new b3;const i=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||Qoe,n._redraw=!0,n._handler=new Mo().scene(i),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=xoe(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const r=Woe(n,e,t.expr);n._runtime=r,n._signals=r.signals,n._bind=(e.bindings||[]).map(s=>({state:null,param:Fe({},s)})),r.root&&r.root.set(i),i.source=r.data.root.input,n.pulse(r.data.root.input,n.changeset().insert(i.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=AM(n,n._width),n._viewHeight=TM(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,Goe(n),uoe(n),coe(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind)}function q0(e,t){return pe(e._signals,t)?e._signals[t]:U("Unrecognized signal name: "+J(t))}function NM(e,t){const n=(e._targets||[]).filter(i=>i._update&&i._update.handler===t);return n.length?n[0]:null}function OM(e,t,n,i){let r=NM(n,i);return r||(r=l7(e,()=>i(t,n.value)),r.handler=i,e.on(n,null,r)),e}function RM(e,t,n){const i=NM(t,n);return i&&t._targets.remove(i),e}K(DM,ou,{async evaluate(e,t,n){if(await ou.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,poe(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(i){this.error(i)}return n&&np(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=e!=null?e+"":null;return t!==this._desc&&gM(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const i=q0(this,e);return arguments.length===1?i.value:this.update(i,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",$M(e)):$M(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(kg(e)||U("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(ou.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(q0(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:Voe,addEventListener(e,t,n){let i=t;return n&&n.trap===!1||(i=l7(this,t),i.raw=t),this._handler.on(e,i),this},removeEventListener(e,t){for(var n=this._handler.handlers(e),i=n.length,r,s;--i>=0;)if(s=n[i].type,r=n[i].handler,e===s&&(t===r||t===r.raw)){this._handler.off(s,r);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return OM(this,e,q0(this,e),t)},removeSignalListener(e,t){return RM(this,q0(this,e),t)},addDataListener(e,t){return OM(this,e,z0(this,e).values,t)},removeDataListener(e,t){return RM(this,z0(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=a7(this,null);this._globalCursor=!!e,t&&a7(this,t)}return this}else return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:Joe,events:woe,finalize:$oe,hover:koe,data:foe,change:P0,insert:doe,remove:hoe,scale:Hoe,initialize:zoe,toImageURL:Boe,toCanvas:Uoe,toSVG:qoe,getState:Xoe,setState:Koe});const nae="view",W0="[",H0="]",LM="{",IM="}",iae=":",zM=",",rae="@",sae=">",oae=/[[\]{}]/,aae={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let PM,BM;function Uo(e,t,n){return PM=t||nae,BM=n||aae,jM(e.trim()).map(d7)}function lae(e){return BM[e]}function kd(e,t,n,i,r){const s=e.length;let o=0,a;for(;t<s;++t){if(a=e[t],!o&&a===n)return t;r&&r.indexOf(a)>=0?--o:i&&i.indexOf(a)>=0&&++o}return t}function jM(e){const t=[],n=e.length;let i=0,r=0;for(;r<n;)r=kd(e,r,zM,W0+LM,H0+IM),t.push(e.substring(i,r).trim()),i=++r;if(t.length===0)throw"Empty event selector: "+e;return t}function d7(e){return e[0]==="["?uae(e):cae(e)}function uae(e){const t=e.length;let n=1,i;if(n=kd(e,n,H0,W0,H0),n===t)throw"Empty between selector: "+e;if(i=jM(e.substring(1,n)),i.length!==2)throw"Between selector must have two elements: "+e;if(e=e.slice(n+1).trim(),e[0]!==sae)throw"Expected '>' after between selector: "+e;i=i.map(d7);const r=d7(e.slice(1).trim());return r.between?{between:i,stream:r}:(r.between=i,r)}function cae(e){const t={source:PM},n=[];let i=[0,0],r=0,s=0,o=e.length,a=0,l,u;if(e[o-1]===IM){if(a=e.lastIndexOf(LM),a>=0){try{i=fae(e.substring(a+1,o-1))}catch{throw"Invalid throttle specification: "+e}e=e.slice(0,a).trim(),o=e.length}else throw"Unmatched right brace: "+e;a=0}if(!o)throw e;if(e[0]===rae&&(r=++a),l=kd(e,a,iae),l<o&&(n.push(e.substring(s,l).trim()),s=a=++l),a=kd(e,a,W0),a===o)n.push(e.substring(s,o).trim());else if(n.push(e.substring(s,a).trim()),u=[],s=++a,s===o)throw"Unmatched left bracket: "+e;for(;a<o;){if(a=kd(e,a,H0),a===o)throw"Unmatched left bracket: "+e;if(u.push(e.substring(s,a).trim()),a<o-1&&e[++a]!==W0)throw"Expected left bracket: "+e;s=++a}if(!(o=n.length)||oae.test(n[o-1]))throw"Invalid event selector: "+e;return o>1?(t.type=n[1],r?t.markname=n[0].slice(1):lae(n[0])?t.marktype=n[0]:t.source=n[0]):t.type=n[0],t.type.slice(-1)==="!"&&(t.consume=!0,t.type=t.type.slice(0,-1)),u!=null&&(t.filter=u),i[0]&&(t.throttle=i[0]),i[1]&&(t.debounce=i[1]),t}function fae(e){const t=e.split(zM);if(!e.length||t.length>2)throw e;return t.map(n=>{const i=+n;if(i!==i)throw e;return i})}function dae(e){return ie(e)?e:{type:e||"pad"}}const $d=e=>+e||0,hae=e=>({top:e,bottom:e,left:e,right:e});function pae(e){return ie(e)?e.signal?e:{top:$d(e.top),bottom:$d(e.bottom),left:$d(e.left),right:$d(e.right)}:hae($d(e))}const Xt=e=>ie(e)&&!q(e)?Fe({},e):{value:e};function UM(e,t,n,i){return n!=null?(ie(n)&&!q(n)||q(n)&&n.length&&ie(n[0])?e.update[t]=n:e[i||"enter"][t]={value:n},1):0}function an(e,t,n){for(const i in t)UM(e,i,t[i]);for(const i in n)UM(e,i,n[i],"update")}function Bu(e,t,n){for(const i in t)n&&pe(n,i)||(e[i]=Fe(e[i]||{},t[i]));return e}function ju(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const h7="mark",p7="frame",g7="scope",gae="axis",mae="axis-domain",yae="axis-grid",bae="axis-label",vae="axis-tick",xae="axis-title",_ae="legend",wae="legend-band",kae="legend-entry",$ae="legend-gradient",qM="legend-label",Eae="legend-symbol",Cae="legend-title",Sae="title",Aae="title-text",Tae="title-subtitle";function Mae(e,t,n,i,r){const s={},o={};let a,l,u,c;l="lineBreak",t==="text"&&r[l]!=null&&!ju(l,e)&&m7(s,l,r[l]),(n=="legend"||String(n).startsWith("axis"))&&(n=null),c=n===p7?r.group:n===h7?Fe({},r.mark,r[t]):null;for(l in c)u=ju(l,e)||(l==="fill"||l==="stroke")&&(ju("fill",e)||ju("stroke",e)),u||m7(s,l,c[l]);ee(i).forEach(f=>{const d=r.style&&r.style[f];for(const h in d)ju(h,e)||m7(s,h,d[h])}),e=Fe({},e);for(l in s)c=s[l],c.signal?(a=a||{})[l]=c:o[l]=c;return e.enter=Fe(o,e.enter),a&&(e.update=Fe(a,e.update)),e}function m7(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const WM=e=>te(e)?J(e):e.signal?`(${e.signal})`:HM(e);function G0(e){if(e.gradient!=null)return Dae(e);let t=e.signal?`(${e.signal})`:e.color?Fae(e.color):e.field!=null?HM(e.field):e.value!==void 0?J(e.value):void 0;return e.scale!=null&&(t=Nae(e,t)),t===void 0&&(t=null),e.exponent!=null&&(t=`pow(${t},${X0(e.exponent)})`),e.mult!=null&&(t+=`*${X0(e.mult)}`),e.offset!=null&&(t+=`+${X0(e.offset)}`),e.round&&(t=`round(${t})`),t}const V0=(e,t,n,i)=>`(${e}(${[t,n,i].map(G0).join(",")})+'')`;function Fae(e){return e.c?V0("hcl",e.h,e.c,e.l):e.h||e.s?V0("hsl",e.h,e.s,e.l):e.l||e.a?V0("lab",e.l,e.a,e.b):e.r||e.g||e.b?V0("rgb",e.r,e.g,e.b):null}function Dae(e){const t=[e.start,e.stop,e.count].map(n=>n==null?null:J(n));for(;t.length&&Ue(t)==null;)t.pop();return t.unshift(WM(e.gradient)),`gradient(${t.join(",")})`}function X0(e){return ie(e)?"("+G0(e)+")":e}function HM(e){return GM(ie(e)?e:{datum:e})}function GM(e){let t,n,i;if(e.signal)t="datum",i=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(i=e.parent,t+=".datum"):i=e.group}else e.datum?(t="datum",i=e.datum):U("Invalid field reference: "+J(e));return e.signal||(i=te(i)?Or(i).map(J).join("]["):GM(i)),t+"["+i+"]"}function Nae(e,t){const n=WM(e.scale);return e.range!=null?t=`lerp(_range(${n}), ${+e.range})`:(t!==void 0&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(+e.band==1?"":"*"+X0(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),t==null&&(t="0")),t}function Oae(e){let t="";return e.forEach(n=>{const i=G0(n);t+=n.test?`(${n.test})?${i}:`:i}),Ue(t)===":"&&(t+="null"),t}function VM(e,t,n,i,r,s){const o={};s=s||{},s.encoders={$encode:o},e=Mae(e,t,n,i,r.config);for(const a in e)o[a]=Rae(e[a],t,s,r);return s}function Rae(e,t,n,i){const r={},s={};for(const o in e)e[o]!=null&&(r[o]=Iae(Lae(e[o]),i,n,s));return{$expr:{marktype:t,channels:r},$fields:Object.keys(s),$output:Object.keys(e)}}function Lae(e){return q(e)?Oae(e):G0(e)}function Iae(e,t,n,i){const r=ts(e,t);return r.$fields.forEach(s=>i[s]=1),Fe(n,r.$params),r.$expr}const zae="outer",Pae=["value","update","init","react","bind"];function XM(e,t){U(e+' for "outer" push: '+J(t))}function YM(e,t){const n=e.name;if(e.push===zae)t.signals[n]||XM("No prior signal definition",n),Pae.forEach(i=>{e[i]!==void 0&&XM("Invalid property ",i)});else{const i=t.addSignal(n,e.value);e.react===!1&&(i.react=!1),e.bind&&t.addBinding(n,e.bind)}}function y7(e,t,n,i){this.id=-1,this.type=e,this.value=t,this.params=n,i&&(this.parent=i)}function Y0(e,t,n,i){return new y7(e,t,n,i)}function Z0(e,t){return Y0("operator",e,t)}function ye(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function Ed(e,t){return t?{$field:e,$name:t}:{$field:e}}const b7=Ed("key");function ZM(e,t){return{$compare:e,$order:t}}function Bae(e,t){const n={$key:e};return t&&(n.$flat=!0),n}const jae="ascending",Uae="descending";function qae(e){return ie(e)?(e.order===Uae?"-":"+")+K0(e.op,e.field):""}function K0(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const v7="scope",x7="view";function jt(e){return e&&e.signal}function Wae(e){return e&&e.expr}function J0(e){if(jt(e))return!0;if(ie(e)){for(const t in e)if(J0(e[t]))return!0}return!1}function cr(e,t){return e??t}function Za(e){return e&&e.signal||e}const KM="timer";function Cd(e,t){return(e.merge?Gae:e.stream?Vae:e.type?Xae:U("Invalid stream specification: "+J(e)))(e,t)}function Hae(e){return e===v7?x7:e||x7}function Gae(e,t){const n=e.merge.map(r=>Cd(r,t)),i=_7({merge:n},e,t);return t.addStream(i).id}function Vae(e,t){const n=Cd(e.stream,t),i=_7({stream:n},e,t);return t.addStream(i).id}function Xae(e,t){let n;e.type===KM?(n=t.event(KM,e.throttle),e={between:e.between,filter:e.filter}):n=t.event(Hae(e.source),e.type);const i=_7({stream:n},e,t);return Object.keys(i).length===1?n:t.addStream(i).id}function _7(e,t,n){let i=t.between;return i&&(i.length!==2&&U('Stream "between" parameter must have 2 entries: '+J(t)),e.between=[Cd(i[0],n),Cd(i[1],n)]),i=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&i.push(Yae(t.marktype,t.markname,t.markrole)),t.source===v7&&i.push("inScope(event.item)"),i.length&&(e.filter=ts("("+i.join(")&&(")+")",n).$expr),(i=t.throttle)!=null&&(e.throttle=+i),(i=t.debounce)!=null&&(e.debounce=+i),t.consume&&(e.consume=!0),e}function Yae(e,t,n){const i="event.item";return i+(e&&e!=="*"?"&&"+i+".mark.marktype==='"+e+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(t?"&&"+i+".mark.name==='"+t+"'":"")}const Zae={code:"_.$value",ast:{type:"Identifier",value:"value"}};function Kae(e,t,n){const i=e.encode,r={target:n};let s=e.events,o=e.update,a=[];s||U("Signal update missing events specification."),te(s)&&(s=Uo(s,t.isSubscope()?v7:x7)),s=ee(s).filter(l=>l.signal||l.scale?(a.push(l),0):1),a.length>1&&(a=[Qae(a)]),s.length&&a.push(s.length>1?{merge:s}:s[0]),i!=null&&(o&&U("Signal encode and update are mutually exclusive."),o="encode(item(),"+J(i)+")"),r.update=te(o)?ts(o,t):o.expr!=null?ts(o.expr,t):o.value!=null?o.value:o.signal!=null?{$expr:Zae,$params:{$value:t.signalRef(o.signal)}}:U("Invalid signal update specification."),e.force&&(r.options={force:!0}),a.forEach(l=>t.addUpdate(Fe(Jae(l,t),r)))}function Jae(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):Cd(e,t)}}function Qae(e){return{signal:"["+e.map(t=>t.scale?'scale("'+t.scale+'")':t.signal)+"]"}}function ele(e,t){const n=t.getSignal(e.name);let i=e.update;e.init&&(i?U("Signals can not include both init and update expressions."):(i=e.init,n.initonly=!0)),i&&(i=ts(i,t),n.update=i.$expr,n.params=i.$params),e.on&&e.on.forEach(r=>Kae(r,t,n.id))}const at=e=>(t,n,i)=>Y0(e,n,t||void 0,i),JM=at("aggregate"),tle=at("axisticks"),QM=at("bound"),fr=at("collect"),eF=at("compare"),nle=at("datajoin"),tF=at("encode"),ile=at("expression"),rle=at("facet"),sle=at("field"),ole=at("key"),ale=at("legendentries"),lle=at("load"),ule=at("mark"),cle=at("multiextent"),fle=at("multivalues"),dle=at("overlap"),hle=at("params"),nF=at("prefacet"),ple=at("projection"),gle=at("proxy"),mle=at("relay"),iF=at("render"),yle=at("scale"),Ka=at("sieve"),ble=at("sortitems"),rF=at("viewlayout"),vle=at("values");let xle=0;const sF={min:"min",max:"max",count:"sum"};function _le(e,t){const n=e.type||"linear";T$(n)||U("Unrecognized scale type: "+J(n)),t.addScale(e.name,{type:n,domain:void 0})}function wle(e,t){const n=t.getScale(e.name).params;let i;n.domain=oF(e.domain,e,t),e.range!=null&&(n.range=lF(e,t,n)),e.interpolate!=null&&Dle(e.interpolate,n),e.nice!=null&&(n.nice=Fle(e.nice)),e.bins!=null&&(n.bins=Mle(e.bins,t));for(i in e)pe(n,i)||i==="name"||(n[i]=zi(e[i],t))}function zi(e,t){return ie(e)?e.signal?t.signalRef(e.signal):U("Unsupported object: "+J(e)):e}function Q0(e,t){return e.signal?t.signalRef(e.signal):e.map(n=>zi(n,t))}function e1(e){U("Can not find data set: "+J(e))}function oF(e,t,n){if(!e){(t.domainMin!=null||t.domainMax!=null)&&U("No scale domain defined for domainMin/domainMax to override.");return}return e.signal?n.signalRef(e.signal):(q(e)?kle:e.fields?Ele:$le)(e,t,n)}function kle(e,t,n){return e.map(i=>zi(i,n))}function $le(e,t,n){const i=n.getData(e.data);return i||e1(e.data),yu(t.type)?i.valuesRef(n,e.field,aF(e.sort,!1)):D$(t.type)?i.domainRef(n,e.field):i.extentRef(n,e.field)}function Ele(e,t,n){const i=e.data,r=e.fields.reduce((s,o)=>(o=te(o)?{data:i,field:o}:q(o)||o.signal?Cle(o,n):o,s.push(o),s),[]);return(yu(t.type)?Sle:D$(t.type)?Ale:Tle)(e,n,r)}function Cle(e,t){const n="_:vega:_"+xle++,i=fr({});if(q(e))i.value={$ingest:e};else if(e.signal){const r="setdata("+J(n)+","+e.signal+")";i.params.input=t.signalRef(r)}return t.addDataPipeline(n,[i,Ka({})]),{data:n,field:"data"}}function Sle(e,t,n){const i=aF(e.sort,!0);let r,s;const o=n.map(u=>{const c=t.getData(u.data);return c||e1(u.data),c.countsRef(t,u.field,i)}),a={groupby:b7,pulse:o};i&&(r=i.op||"count",s=i.field?K0(r,i.field):"count",a.ops=[sF[r]],a.fields=[t.fieldRef(s)],a.as=[s]),r=t.add(JM(a));const l=t.add(fr({pulse:ye(r)}));return s=t.add(vle({field:b7,sort:t.sortRef(i),pulse:ye(l)})),ye(s)}function aF(e,t){return e&&(!e.field&&!e.op?ie(e)?e.field="key":e={field:"key"}:!e.field&&e.op!=="count"?U("No field provided for sort aggregate op: "+e.op):t&&e.field&&e.op&&!sF[e.op]&&U("Multiple domain scales can not be sorted using "+e.op)),e}function Ale(e,t,n){const i=n.map(r=>{const s=t.getData(r.data);return s||e1(r.data),s.domainRef(t,r.field)});return ye(t.add(fle({values:i})))}function Tle(e,t,n){const i=n.map(r=>{const s=t.getData(r.data);return s||e1(r.data),s.extentRef(t,r.field)});return ye(t.add(cle({extents:i})))}function Mle(e,t){return e.signal||q(e)?Q0(e,t):t.objectProperty(e)}function Fle(e){return ie(e)?{interval:zi(e.interval),step:zi(e.step)}:zi(e)}function Dle(e,t){t.interpolate=zi(e.type||e),e.gamma!=null&&(t.interpolateGamma=zi(e.gamma))}function lF(e,t,n){const i=t.config.range;let r=e.range;if(r.signal)return t.signalRef(r.signal);if(te(r)){if(i&&pe(i,r))return e=Fe({},e,{range:i[r]}),lF(e,t,n);r==="width"?r=[0,{signal:"width"}]:r==="height"?r=yu(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:U("Unrecognized scale range value: "+J(r))}else if(r.scheme){n.scheme=q(r.scheme)?Q0(r.scheme,t):zi(r.scheme,t),r.extent&&(n.schemeExtent=Q0(r.extent,t)),r.count&&(n.schemeCount=zi(r.count,t));return}else if(r.step){n.rangeStep=zi(r.step,t);return}else{if(yu(e.type)&&!q(r))return oF(r,e,t);q(r)||U("Unsupported range type: "+J(r))}return r.map(s=>(q(s)?Q0:zi)(s,t))}function Nle(e,t){const n=t.config.projection||{},i={};for(const r in e)r!=="name"&&(i[r]=w7(e[r],r,t));for(const r in n)i[r]==null&&(i[r]=w7(n[r],r,t));t.addProjection(e.name,i)}function w7(e,t,n){return q(e)?e.map(i=>w7(i,t,n)):ie(e)?e.signal?n.signalRef(e.signal):t==="fit"?e:U("Unsupported parameter object: "+J(e)):e}const dr="top",Uu="left",qu="right",qo="bottom",uF="center",Ole="vertical",Rle="start",Lle="middle",Ile="end",k7="index",$7="label",zle="offset",Wu="perc",Ple="perc2",Pi="value",Sd="guide-label",E7="guide-title",Ble="group-title",jle="group-subtitle",cF="symbol",t1="gradient",C7="discrete",S7="size",A7=[S7,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],Ad={name:1,style:1,interactive:1},Ve={value:0},Bi={value:1},n1="group",fF="rect",T7="rule",Ule="symbol",Ja="text";function Td(e){return e.type=n1,e.interactive=e.interactive||!1,e}function ii(e,t){const n=(i,r)=>cr(e[i],cr(t[i],r));return n.isVertical=i=>Ole===cr(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>cr(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>cr(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>cr(e.columns,cr(t.columns,+n.isVertical(!0))),n}function dF(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function qle(e,t,n){const i=t.config.style[n];return i&&i[e]}function i1(e,t,n){return`item.anchor === '${Rle}' ? ${e} : item.anchor === '${Ile}' ? ${t} : ${n}`}const M7=i1(J(Uu),J(qu),J(uF));function Wle(e){const t=e("tickBand");let n=e("tickOffset"),i,r;return t?t.signal?(i={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},ie(n)||(n={signal:`(${t.signal}) === 'extent' ? 0 : ${n}`})):t==="extent"?(i=1,r=!0,n=0):(i=.5,r=!1):(i=e("bandPosition"),r=e("tickExtra")),{extra:r,band:i,offset:n}}function hF(e,t){return t?e?ie(e)?Object.assign({},e,{offset:hF(e.offset,t)}):{value:e,offset:t}:t:e}function wi(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=Bu(e.encode,t,Ad)):e.interactive=!1,e}function Hle(e,t,n,i){const r=ii(e,n),s=r.isVertical(),o=r.gradientThickness(),a=r.gradientLength();let l,u,c,f,d;s?(u=[0,1],c=[0,0],f=o,d=a):(u=[0,0],c=[1,0],f=a,d=o);const h={enter:l={opacity:Ve,x:Ve,y:Ve,width:Xt(f),height:Xt(d)},update:Fe({},l,{opacity:Bi,fill:{gradient:t,start:u,stop:c}}),exit:{opacity:Ve}};return an(h,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),wi({type:fF,role:$ae,encode:h},i)}function Gle(e,t,n,i,r){const s=ii(e,n),o=s.isVertical(),a=s.gradientThickness(),l=s.gradientLength();let u,c,f,d,h="";o?(u="y",f="y2",c="x",d="width",h="1-"):(u="x",f="x2",c="y",d="height");const p={opacity:Ve,fill:{scale:t,field:Pi}};p[u]={signal:h+"datum."+Wu,mult:l},p[c]=Ve,p[f]={signal:h+"datum."+Ple,mult:l},p[d]=Xt(a);const g={enter:p,update:Fe({},p,{opacity:Bi}),exit:{opacity:Ve}};return an(g,{stroke:s("gradientStrokeColor"),strokeWidth:s("gradientStrokeWidth")},{opacity:s("gradientOpacity")}),wi({type:fF,role:wae,key:Pi,from:r,encode:g},i)}const Vle=`datum.${Wu}<=0?"${Uu}":datum.${Wu}>=1?"${qu}":"${uF}"`,Xle=`datum.${Wu}<=0?"${qo}":datum.${Wu}>=1?"${dr}":"${Lle}"`;function pF(e,t,n,i){const r=ii(e,t),s=r.isVertical(),o=Xt(r.gradientThickness()),a=r.gradientLength();let l=r("labelOverlap"),u,c,f,d,h="";const p={enter:u={opacity:Ve},update:c={opacity:Bi,text:{field:$7}},exit:{opacity:Ve}};return an(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:cr(e.labelLimit,t.gradientLabelLimit)}),s?(u.align={value:"left"},u.baseline=c.baseline={signal:Xle},f="y",d="x",h="1-"):(u.align=c.align={signal:Vle},u.baseline={value:"top"},f="x",d="y"),u[f]=c[f]={signal:h+"datum."+Wu,mult:a},u[d]=c[d]=o,o.offset=cr(e.labelOffset,t.gradientLabelOffset)||0,l=l?{separation:r("labelSeparation"),method:l,order:"datum."+k7}:void 0,wi({type:Ja,role:qM,style:Sd,key:Pi,from:i,encode:p,overlap:l},n)}function Yle(e,t,n,i,r){const s=ii(e,t),o=n.entries,a=!!(o&&o.interactive),l=o?o.name:void 0,u=s("clipHeight"),c=s("symbolOffset"),f={data:"value"},d=`(${r}) ? datum.${zle} : datum.${S7}`,h=u?Xt(u):{field:S7},p=`datum.${k7}`,g=`max(1, ${r})`;let m,y,b,v,x;h.mult=.5,m={enter:y={opacity:Ve,x:{signal:d,mult:.5,offset:c},y:h},update:b={opacity:Bi,x:y.x,y:y.y},exit:{opacity:Ve}};let _=null,k=null;e.fill||(_=t.symbolBaseFillColor,k=t.symbolBaseStrokeColor),an(m,{fill:s("symbolFillColor",_),shape:s("symbolType"),size:s("symbolSize"),stroke:s("symbolStrokeColor",k),strokeDash:s("symbolDash"),strokeDashOffset:s("symbolDashOffset"),strokeWidth:s("symbolStrokeWidth")},{opacity:s("symbolOpacity")}),A7.forEach(E=>{e[E]&&(b[E]=y[E]={scale:e[E],field:Pi})});const w=wi({type:Ule,role:Eae,key:Pi,from:f,clip:u?!0:void 0,encode:m},n.symbols),$=Xt(c);$.offset=s("labelOffset"),m={enter:y={opacity:Ve,x:{signal:d,offset:$},y:h},update:b={opacity:Bi,text:{field:$7},x:y.x,y:y.y},exit:{opacity:Ve}},an(m,{align:s("labelAlign"),baseline:s("labelBaseline"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontStyle:s("labelFontStyle"),fontWeight:s("labelFontWeight"),limit:s("labelLimit")});const S=wi({type:Ja,role:qM,style:Sd,key:Pi,from:f,encode:m},n.labels);return m={enter:{noBound:{value:!u},width:Ve,height:u?Xt(u):Ve,opacity:Ve},exit:{opacity:Ve},update:b={opacity:Bi,row:{signal:null},column:{signal:null}}},s.isVertical(!0)?(v=`ceil(item.mark.items.length / ${g})`,b.row.signal=`${p}%${v}`,b.column.signal=`floor(${p} / ${v})`,x={field:["row",p]}):(b.row.signal=`floor(${p} / ${g})`,b.column.signal=`${p} % ${g}`,x={field:p}),b.column.signal=`(${r})?${b.column.signal}:${p}`,i={facet:{data:i,name:"value",groupby:k7}},Td({role:g7,from:i,encode:Bu(m,o,Ad),marks:[w,S],name:l,interactive:a,sort:x})}function Zle(e,t){const n=ii(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}const F7='item.orient === "left"',D7='item.orient === "right"',r1=`(${F7} || ${D7})`,Kle=`datum.vgrad && ${r1}`,Jle=i1('"top"','"bottom"','"middle"'),Qle=i1('"right"','"left"','"center"'),eue=`datum.vgrad && ${D7} ? (${Qle}) : (${r1} && !(datum.vgrad && ${F7})) ? "left" : ${M7}`,tue=`item._anchor || (${r1} ? "middle" : "start")`,nue=`${Kle} ? (${F7} ? -90 : 90) : 0`,iue=`${r1} ? (datum.vgrad ? (${D7} ? "bottom" : "top") : ${Jle}) : "top"`;function rue(e,t,n,i){const r=ii(e,t),s={enter:{opacity:Ve},update:{opacity:Bi,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ve}};return an(s,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:tue},angle:{signal:nue},align:{signal:eue},baseline:{signal:iue},text:e.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")}),wi({type:Ja,role:Cae,style:E7,from:i,encode:s},n)}function sue(e,t){let n;return ie(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+gF(e.path)+")":e.sphere&&(n="geoShape("+gF(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function gF(e){return ie(e)&&e.signal?e.signal:J(e)}function mF(e){const t=e.role||"";return!t.indexOf("axis")||!t.indexOf("legend")||!t.indexOf("title")?t:e.type===n1?g7:t||h7}function oue(e){return{marktype:e.type,name:e.name||void 0,role:e.role||mF(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function aue(e,t){return e&&e.signal?t.signalRef(e.signal):e!==!1}function N7(e,t){const n=tk(e.type);n||U("Unrecognized transform type: "+J(e.type));const i=Y0(n.type.toLowerCase(),null,yF(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(i)),i.metadata=n.metadata||{},i}function yF(e,t,n){const i={},r=e.params.length;for(let s=0;s<r;++s){const o=e.params[s];i[o.name]=lue(o,t,n)}return i}function lue(e,t,n){const i=e.type,r=t[e.name];if(i==="index")return uue(e,t,n);if(r===void 0){e.required&&U("Missing required "+J(t.type)+" parameter: "+J(e.name));return}else{if(i==="param")return cue(e,t,n);if(i==="projection")return n.projectionRef(t[e.name])}return e.array&&!jt(r)?r.map(s=>bF(e,s,n)):bF(e,r,n)}function bF(e,t,n){const i=e.type;if(jt(t))return xF(i)?U("Expression references can not be signals."):O7(i)?n.fieldRef(t):_F(i)?n.compareRef(t):n.signalRef(t.signal);{const r=e.expr||O7(i);return r&&fue(t)?n.exprRef(t.expr,t.as):r&&due(t)?Ed(t.field,t.as):xF(i)?ts(t,n):hue(i)?ye(n.getData(t).values):O7(i)?Ed(t):_F(i)?n.compareRef(t):t}}function uue(e,t,n){return te(t.from)||U('Lookup "from" parameter must be a string literal.'),n.getData(t.from).lookupRef(n,t.key)}function cue(e,t,n){const i=t[e.name];return e.array?(q(i)||U("Expected an array of sub-parameters. Instead: "+J(i)),i.map(r=>vF(e,r,n))):vF(e,i,n)}function vF(e,t,n){const i=e.params.length;let r;for(let o=0;o<i;++o){r=e.params[o];for(const a in r.key)if(r.key[a]!==t[a]){r=null;break}if(r)break}r||U("Unsupported parameter: "+J(t));const s=Fe(yF(r,t,n),r.key);return ye(n.add(hle(s)))}const fue=e=>e&&e.expr,due=e=>e&&e.field,hue=e=>e==="data",xF=e=>e==="expr",O7=e=>e==="field",_F=e=>e==="compare";function pue(e,t,n){let i,r,s,o,a;return e?(i=e.facet)&&(t||U("Only group marks can be faceted."),i.field!=null?o=a=s1(i,n):(e.data?a=ye(n.getData(e.data).aggregate):(s=N7(Fe({type:"aggregate",groupby:ee(i.groupby)},i.aggregate),n),s.params.key=n.keyRef(i.groupby),s.params.pulse=s1(i,n),o=a=ye(n.add(s))),r=n.keyRef(i.groupby,!0))):o=ye(n.add(fr(null,[{}]))),o||(o=s1(e,n)),{key:r,pulse:o,parent:a}}function s1(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:ye(t.getData(e.data).output)}function Qa(e,t,n,i,r){this.scope=e,this.input=t,this.output=n,this.values=i,this.aggregate=r,this.index={}}Qa.fromEntries=function(e,t){const n=t.length,i=t[n-1],r=t[n-2];let s=t[0],o=null,a=1;for(s&&s.type==="load"&&(s=t[1]),e.add(t[0]);a<n;++a)t[a].params.pulse=ye(t[a-1]),e.add(t[a]),t[a].type==="aggregate"&&(o=t[a]);return new Qa(e,s,r,i,o)};function wF(e){return te(e)?e:null}function kF(e,t,n){const i=K0(n.op,n.field);let r;if(t.ops){for(let s=0,o=t.as.length;s<o;++s)if(t.as[s]===i)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((r=n.op.signal)?e.signalRef(r):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(i))}function Md(e,t,n,i,r,s,o){const a=t[n]||(t[n]={}),l=qae(s);let u=wF(r),c,f;if(u!=null&&(e=t.scope,u=u+(l?"|"+l:""),c=a[u]),!c){const d=s?{field:b7,pulse:t.countsRef(e,r,s)}:{field:e.fieldRef(r),pulse:ye(t.output)};l&&(d.sort=e.sortRef(s)),f=e.add(Y0(i,void 0,d)),o&&(t.index[r]=f),c=ye(f),u!=null&&(a[u]=c)}return c}Qa.prototype={countsRef(e,t,n){const i=this,r=i.counts||(i.counts={}),s=wF(t);let o,a,l;return s!=null&&(e=i.scope,o=r[s]),o?n&&n.field&&kF(e,o.agg.params,n):(l={groupby:e.fieldRef(t,"key"),pulse:ye(i.output)},n&&n.field&&kF(e,l,n),a=e.add(JM(l)),o=e.add(fr({pulse:ye(a)})),o={agg:a,ref:ye(o)},s!=null&&(r[s]=o)),o.ref},tuplesRef(){return ye(this.values)},extentRef(e,t){return Md(e,this,"extent","extent",t,!1)},domainRef(e,t){return Md(e,this,"domain","values",t,!1)},valuesRef(e,t,n){return Md(e,this,"vals","values",t,n||!0)},lookupRef(e,t){return Md(e,this,"lookup","tupleindex",t,!1)},indataRef(e,t){return Md(e,this,"indata","tupleindex",t,!0,!0)}};function gue(e,t,n){const i=e.from.facet,r=i.name,s=s1(i,t);let o;i.name||U("Facet must have a name: "+J(i)),i.data||U("Facet must reference a data set: "+J(i)),i.field?o=t.add(nF({field:t.fieldRef(i.field),pulse:s})):i.groupby?o=t.add(rle({key:t.keyRef(i.groupby),group:ye(t.proxy(n.parent)),pulse:s})):U("Facet must specify groupby or field: "+J(i));const a=t.fork(),l=a.add(fr()),u=a.add(Ka({pulse:ye(l)}));a.addData(r,new Qa(a,l,l,u)),a.addSignal("parent",null),o.params.subflow={$subflow:a.parse(e).toRuntime()}}function mue(e,t,n){const i=t.add(nF({pulse:n.pulse})),r=t.fork();r.add(Ka()),r.addSignal("parent",null),i.params.subflow={$subflow:r.parse(e).toRuntime()}}function $F(e,t,n){const i=e.remove,r=e.insert,s=e.toggle,o=e.modify,a=e.values,l=t.add(Z0()),u="if("+e.trigger+',modify("'+n+'",'+[r,i,s,o,a].map(f=>f??"null").join(",")+"),0)",c=ts(u,t);l.update=c.$expr,l.params=c.$params}function o1(e,t){const n=mF(e),i=e.type===n1,r=e.from&&e.from.facet,s=e.overlap;let o=e.layout||n===g7||n===p7,a,l,u,c,f,d,h;const p=n===h7||o||r,g=pue(e.from,i,t);l=t.add(nle({key:g.key||(e.key?Ed(e.key):void 0),pulse:g.pulse,clean:!i}));const m=ye(l);l=u=t.add(fr({pulse:m})),l=t.add(ule({markdef:oue(e),interactive:aue(e.interactive,t),clip:sue(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:ye(l)}));const y=ye(l);l=c=t.add(tF(VM(e.encode,e.type,n,e.style,t,{mod:!1,pulse:y}))),l.params.parent=t.encode(),e.transform&&e.transform.forEach(k=>{const w=N7(k,t),$=w.metadata;($.generates||$.changes)&&U("Mark transforms should not generate new data."),$.nomod||(c.params.mod=!0),w.params.pulse=ye(l),t.add(l=w)}),e.sort&&(l=t.add(ble({sort:t.compareRef(e.sort),pulse:ye(l)})));const b=ye(l);(r||o)&&(o=t.add(rF({layout:t.objectProperty(e.layout),legends:t.legends,mark:y,pulse:b})),d=ye(o));const v=t.add(QM({mark:y,pulse:d||b}));h=ye(v),i&&(p&&(a=t.operators,a.pop(),o&&a.pop()),t.pushState(b,d||h,m),r?gue(e,t,g):p?mue(e,t,g):t.parse(e),t.popState(),p&&(o&&a.push(o),a.push(v))),s&&(h=yue(s,h,t));const x=t.add(iF({pulse:h})),_=t.add(Ka({pulse:ye(x)},void 0,t.parent()));e.name!=null&&(f=e.name,t.addData(f,new Qa(t,u,x,_)),e.on&&e.on.forEach(k=>{(k.insert||k.remove||k.toggle)&&U("Marks only support modify triggers."),$F(k,t,f)}))}function yue(e,t,n){const i=e.method,r=e.bound,s=e.separation,o={separation:jt(s)?n.signalRef(s.signal):s,method:jt(i)?n.signalRef(i.signal):i,pulse:t};if(e.order&&(o.sort=n.compareRef({field:e.order})),r){const a=r.tolerance;o.boundTolerance=jt(a)?n.signalRef(a.signal):+a,o.boundScale=n.scaleRef(r.scale),o.boundOrient=r.orient}return ye(n.add(dle(o)))}function bue(e,t){const n=t.config.legend,i=e.encode||{},r=ii(e,n),s=i.legend||{},o=s.name||void 0,a=s.interactive,l=s.style,u={};let c=0,f,d,h;A7.forEach(v=>e[v]?(u[v]=e[v],c=c||e[v]):0),c||U("Missing valid scale for legend.");const p=vue(e,t.scaleType(c)),g={title:e.title!=null,scales:u,type:p,vgrad:p!=="symbol"&&r.isVertical()},m=ye(t.add(fr(null,[g]))),y={enter:{x:{value:0},y:{value:0}}},b=ye(t.add(ale(d={type:p,scale:t.scaleRef(c),count:t.objectProperty(r("tickCount")),limit:t.property(r("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===t1?(h=[Hle(e,c,n,i.gradient),pF(e,n,i.labels,b)],d.count=d.count||t.signalRef(`max(2,2*floor((${Za(r.gradientLength())})/100))`)):p===C7?h=[Gle(e,c,n,i.gradient,b),pF(e,n,i.labels,b)]:(f=Zle(e,n),h=[Yle(e,n,i,b,Za(f.columns))],d.size=wue(e,t,h[0].marks)),h=[Td({role:kae,from:m,encode:y,marks:h,layout:f,interactive:a})],g.title&&h.push(rue(e,n,i.title,m)),o1(Td({role:_ae,from:m,encode:Bu(_ue(r,e,n),s,Ad),marks:h,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:o,interactive:a,style:l}),t)}function vue(e,t){let n=e.type||cF;return!e.type&&xue(e)===1&&(e.fill||e.stroke)&&(n=Rb(t)?t1:Lb(t)?C7:cF),n!==t1?n:Lb(t)?C7:t1}function xue(e){return A7.reduce((t,n)=>t+(e[n]?1:0),0)}function _ue(e,t,n){const i={enter:{},update:{}};return an(i,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),i}function wue(e,t,n){const i=Za(EF("size",e,n)),r=Za(EF("strokeWidth",e,n)),s=Za(kue(n[1].encode,t,Sd));return ts(`max(ceil(sqrt(${i})+${r}),${s})`,t)}function EF(e,t,n){return t[e]?`scale("${t[e]}",datum)`:dF(e,n[0].encode)}function kue(e,t,n){return dF("fontSize",e)||qle("fontSize",t,n)}const $ue=`item.orient==="${Uu}"?-90:item.orient==="${qu}"?90:0`;function Eue(e,t){e=te(e)?{text:e}:e;const n=ii(e,t.config.title),i=e.encode||{},r=i.group||{},s=r.name||void 0,o=r.interactive,a=r.style,l=[],u={},c=ye(t.add(fr(null,[u])));return l.push(Aue(e,n,Cue(e),c)),e.subtitle&&l.push(Tue(e,n,i.subtitle,c)),o1(Td({role:Sae,from:c,encode:Sue(n,r),marks:l,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:s,interactive:o,style:a}),t)}function Cue(e){const t=e.encode;return t&&t.title||Fe({name:e.name,interactive:e.interactive,style:e.style},t)}function Sue(e,t){const n={enter:{},update:{}};return an(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:M7},angle:{signal:$ue},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),Bu(n,t,Ad)}function Aue(e,t,n,i){const r={value:0},s=e.text,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return an(o,{text:s,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),wi({type:Ja,role:Aae,style:Ble,from:i,encode:o},n)}function Tue(e,t,n,i){const r={value:0},s=e.subtitle,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return an(o,{text:s,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),wi({type:Ja,role:Tae,style:jle,from:i,encode:o},n)}function Mue(e,t){const n=[];e.transform&&e.transform.forEach(i=>{n.push(N7(i,t))}),e.on&&e.on.forEach(i=>{$F(i,t,e.name)}),t.addDataPipeline(e.name,Fue(e,t,n))}function Fue(e,t,n){const i=[];let r=null,s=!1,o=!1,a,l,u,c,f;for(e.values?jt(e.values)||J0(e.format)?(i.push(CF(t,e)),i.push(r=el())):i.push(r=el({$ingest:e.values,$format:e.format})):e.url?J0(e.url)||J0(e.format)?(i.push(CF(t,e)),i.push(r=el())):i.push(r=el({$request:e.url,$format:e.format})):e.source&&(r=a=ee(e.source).map(d=>ye(t.getData(d).output)),i.push(null)),l=0,u=n.length;l<u;++l)c=n[l],f=c.metadata,!r&&!f.source&&i.push(r=el()),i.push(c),f.generates&&(o=!0),f.modifies&&!o&&(s=!0),f.source?r=c:f.changes&&(r=null);return a&&(u=a.length-1,i[0]=mle({derive:s,pulse:u?a:a[0]}),(s||u)&&i.splice(1,0,el())),r||i.push(el()),i.push(Ka({})),i}function el(e){const t=fr({},e);return t.metadata={source:!0},t}function CF(e,t){return lle({url:t.url?e.property(t.url):void 0,async:t.async?e.property(t.async):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}const SF=e=>e===qo||e===dr,a1=(e,t,n)=>jt(e)?Rue(e.signal,t,n):e===Uu||e===dr?t:n,Yt=(e,t,n)=>jt(e)?Nue(e.signal,t,n):SF(e)?t:n,hr=(e,t,n)=>jt(e)?Oue(e.signal,t,n):SF(e)?n:t,AF=(e,t,n)=>jt(e)?Lue(e.signal,t,n):e===dr?{value:t}:{value:n},Due=(e,t,n)=>jt(e)?Iue(e.signal,t,n):e===qu?{value:t}:{value:n},Nue=(e,t,n)=>TF(`${e} === '${dr}' || ${e} === '${qo}'`,t,n),Oue=(e,t,n)=>TF(`${e} !== '${dr}' && ${e} !== '${qo}'`,t,n),Rue=(e,t,n)=>R7(`${e} === '${Uu}' || ${e} === '${dr}'`,t,n),Lue=(e,t,n)=>R7(`${e} === '${dr}'`,t,n),Iue=(e,t,n)=>R7(`${e} === '${qu}'`,t,n),TF=(e,t,n)=>(t=t!=null?Xt(t):t,n=n!=null?Xt(n):n,MF(t)&&MF(n)?(t=t?t.signal||J(t.value):null,n=n?n.signal||J(n.value):null,{signal:`${e} ? (${t}) : (${n})`}):[Fe({test:e},t)].concat(n||[])),MF=e=>e==null||Object.keys(e).length===1,R7=(e,t,n)=>({signal:`${e} ? (${Hu(t)}) : (${Hu(n)})`}),zue=(e,t,n,i,r)=>({signal:(i!=null?`${e} === '${Uu}' ? (${Hu(i)}) : `:"")+(n!=null?`${e} === '${qo}' ? (${Hu(n)}) : `:"")+(r!=null?`${e} === '${qu}' ? (${Hu(r)}) : `:"")+(t!=null?`${e} === '${dr}' ? (${Hu(t)}) : `:"")+"(null)"}),Hu=e=>jt(e)?e.signal:e==null?null:J(e),Pue=(e,t)=>t===0?0:jt(e)?{signal:`(${e.signal}) * ${t}`}:{value:e*t},Gu=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function Vu(e,t,n,i){let r;if(t&&pe(t,e))return t[e];if(pe(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=e[5].toLowerCase()+e.slice(6)}return i[E7][r]}else if(e.startsWith("label")){switch(e){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=e[5].toLowerCase()+e.slice(6)}return i[Sd][r]}return null}function FF(e){const t={};for(const n of e)if(n)for(const i in n)t[i]=1;return Object.keys(t)}function Bue(e,t){var n=t.config,i=n.style,r=n.axis,s=t.scaleType(e.scale)==="band"&&n.axisBand,o=e.orient,a,l,u;if(jt(o)){const f=FF([n.axisX,n.axisY]),d=FF([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);a={};for(u of f)a[u]=Yt(o,Vu(u,n.axisX,r,i),Vu(u,n.axisY,r,i));l={};for(u of d)l[u]=zue(o.signal,Vu(u,n.axisTop,r,i),Vu(u,n.axisBottom,r,i),Vu(u,n.axisLeft,r,i),Vu(u,n.axisRight,r,i))}else a=o===dr||o===qo?n.axisX:n.axisY,l=n["axis"+o[0].toUpperCase()+o.slice(1)];return a||l||s?Fe({},r,a,l,s):r}function jue(e,t,n,i){const r=ii(e,t),s=e.orient;let o,a;const l={enter:o={opacity:Ve},update:a={opacity:Bi},exit:{opacity:Ve}};an(l,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const u=DF(e,0),c=DF(e,1);return o.x=a.x=Yt(s,u,Ve),o.x2=a.x2=Yt(s,c),o.y=a.y=hr(s,u,Ve),o.y2=a.y2=hr(s,c),wi({type:T7,role:mae,from:i,encode:l},n)}function DF(e,t){return{scale:e.scale,range:t}}function Uue(e,t,n,i,r){const s=ii(e,t),o=e.orient,a=e.gridScale,l=a1(o,1,-1),u=que(e.offset,l);let c,f,d;const h={enter:c={opacity:Ve},update:d={opacity:Bi},exit:f={opacity:Ve}};an(h,{stroke:s("gridColor"),strokeCap:s("gridCap"),strokeDash:s("gridDash"),strokeDashOffset:s("gridDashOffset"),strokeOpacity:s("gridOpacity"),strokeWidth:s("gridWidth")});const p={scale:e.scale,field:Pi,band:r.band,extra:r.extra,offset:r.offset,round:s("tickRound")},g=Yt(o,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:l,offset:u}:{value:0,offset:u},y=a?{scale:a,range:1,mult:l,offset:u}:Fe(g,{mult:l,offset:u});return c.x=d.x=Yt(o,p,m),c.y=d.y=hr(o,p,m),c.x2=d.x2=hr(o,y),c.y2=d.y2=Yt(o,y),f.x=Yt(o,p),f.y=hr(o,p),wi({type:T7,role:yae,key:Pi,from:i,encode:h},n)}function que(e,t){if(t!==1)if(!ie(e))e=jt(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);else{let n=e=Fe({},e);for(;n.mult!=null;)if(ie(n.mult))n=n.mult=Fe({},n.mult);else return n.mult=jt(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n.mult=t}return e}function Wue(e,t,n,i,r,s){const o=ii(e,t),a=e.orient,l=a1(a,-1,1);let u,c,f;const d={enter:u={opacity:Ve},update:f={opacity:Bi},exit:c={opacity:Ve}};an(d,{stroke:o("tickColor"),strokeCap:o("tickCap"),strokeDash:o("tickDash"),strokeDashOffset:o("tickDashOffset"),strokeOpacity:o("tickOpacity"),strokeWidth:o("tickWidth")});const h=Xt(r);h.mult=l;const p={scale:e.scale,field:Pi,band:s.band,extra:s.extra,offset:s.offset,round:o("tickRound")};return f.y=u.y=Yt(a,Ve,p),f.y2=u.y2=Yt(a,h),c.x=Yt(a,p),f.x=u.x=hr(a,Ve,p),f.x2=u.x2=hr(a,h),c.y=hr(a,p),wi({type:T7,role:vae,key:Pi,from:i,encode:d},n)}function L7(e,t,n,i,r){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+i+","+r+")"}}function Hue(e,t,n,i,r,s){const o=ii(e,t),a=e.orient,l=e.scale,u=a1(a,-1,1),c=Za(o("labelFlush")),f=Za(o("labelFlushOffset")),d=o("labelAlign"),h=o("labelBaseline");let p=c===0||!!c,g;const m=Xt(r);m.mult=u,m.offset=Xt(o("labelPadding")||0),m.offset.mult=u;const y={scale:l,field:Pi,band:.5,offset:hF(s.offset,o("labelOffset"))},b=Yt(a,p?L7(l,c,'"left"','"right"','"center"'):{value:"center"},Due(a,"left","right")),v=Yt(a,AF(a,"bottom","top"),p?L7(l,c,'"top"','"bottom"','"middle"'):{value:"middle"}),x=L7(l,c,`-(${f})`,f,0);p=p&&f;const _={opacity:Ve,x:Yt(a,y,m),y:hr(a,y,m)},k={enter:_,update:g={opacity:Bi,text:{field:$7},x:_.x,y:_.y,align:b,baseline:v},exit:{opacity:Ve,x:_.x,y:_.y}};an(k,{dx:!d&&p?Yt(a,x):null,dy:!h&&p?hr(a,x):null}),an(k,{angle:o("labelAngle"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontWeight:o("labelFontWeight"),fontStyle:o("labelFontStyle"),limit:o("labelLimit"),lineHeight:o("labelLineHeight")},{align:d,baseline:h});const w=o("labelBound");let $=o("labelOverlap");return $=$||w?{separation:o("labelSeparation"),method:$,order:"datum.index",bound:w?{scale:l,orient:a,tolerance:w}:null}:void 0,g.align!==b&&(g.align=Gu(g.align,b)),g.baseline!==v&&(g.baseline=Gu(g.baseline,v)),wi({type:Ja,role:bae,style:Sd,key:Pi,from:i,encode:k,overlap:$},n)}function Gue(e,t,n,i){const r=ii(e,t),s=e.orient,o=a1(s,-1,1);let a,l;const u={enter:a={opacity:Ve,anchor:Xt(r("titleAnchor",null)),align:{signal:M7}},update:l=Fe({},a,{opacity:Bi,text:Xt(e.title)}),exit:{opacity:Ve}},c={signal:`lerp(range("${e.scale}"), ${i1(0,1,.5)})`};return l.x=Yt(s,c),l.y=hr(s,c),a.angle=Yt(s,Ve,Pue(o,90)),a.baseline=Yt(s,AF(s,qo,dr),{value:qo}),l.angle=a.angle,l.baseline=a.baseline,an(u,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")}),Vue(r,s,u,n),u.update.align=Gu(u.update.align,a.align),u.update.angle=Gu(u.update.angle,a.angle),u.update.baseline=Gu(u.update.baseline,a.baseline),wi({type:Ja,role:xae,style:E7,from:i,encode:u},n)}function Vue(e,t,n,i){const r=(a,l)=>a!=null?(n.update[l]=Gu(Xt(a),n.update[l]),!1):!ju(l,i),s=r(e("titleX"),"x"),o=r(e("titleY"),"y");n.enter.auto=o===s?Xt(o):Yt(t,Xt(o),Xt(s))}function Xue(e,t){const n=Bue(e,t),i=e.encode||{},r=i.axis||{},s=r.name||void 0,o=r.interactive,a=r.style,l=ii(e,n),u=Wle(l),c={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:e.title!=null},f=ye(t.add(fr({},[c]))),d=ye(t.add(tle({scale:t.scaleRef(e.scale),extra:t.property(u.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),h=[];let p;return c.grid&&h.push(Uue(e,n,i.grid,d,u)),c.ticks&&(p=l("tickSize"),h.push(Wue(e,n,i.ticks,d,p,u))),c.labels&&(p=c.ticks?p:0,h.push(Hue(e,n,i.labels,d,p,u))),c.domain&&h.push(jue(e,n,i.domain,f)),c.title&&h.push(Gue(e,n,i.title,f)),o1(Td({role:gae,from:f,encode:Bu(Yue(l,e),r,Ad),marks:h,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:s,interactive:o,style:a}),t)}function Yue(e,t){const n={enter:{},update:{}};return an(n,{orient:e("orient"),offset:e("offset")||0,position:cr(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function NF(e,t,n){const i=ee(e.signals),r=ee(e.scales);return n||i.forEach(s=>YM(s,t)),ee(e.projections).forEach(s=>Nle(s,t)),r.forEach(s=>_le(s,t)),ee(e.data).forEach(s=>Mue(s,t)),r.forEach(s=>wle(s,t)),(n||i).forEach(s=>ele(s,t)),ee(e.axes).forEach(s=>Xue(s,t)),ee(e.marks).forEach(s=>o1(s,t)),ee(e.legends).forEach(s=>bue(s,t)),e.title&&Eue(e.title,t),t.parseLambdas(),t}const Zue=e=>Bu({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e);function Kue(e,t){const n=t.config,i=ye(t.root=t.add(Z0())),r=Jue(e,n);r.forEach(u=>YM(u,t)),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const s=t.add(fr()),o=t.add(tF(VM(Zue(e.encode),n1,p7,e.style,t,{pulse:ye(s)}))),a=t.add(rF({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:i,pulse:ye(o)}));t.operators.pop(),t.pushState(ye(o),ye(a),null),NF(e,t,r),t.operators.push(a);let l=t.add(QM({mark:i,pulse:ye(a)}));return l=t.add(iF({pulse:ye(l)})),l=t.add(Ka({pulse:ye(l)})),t.addData("root",new Qa(t,s,s,l)),t}function Fd(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function Jue(e,t){const n=o=>cr(e[o],t[o]),i=[Fd("background",n("background")),Fd("autosize",dae(n("autosize"))),Fd("padding",pae(n("padding"))),Fd("width",n("width")||0),Fd("height",n("height")||0)],r=i.reduce((o,a)=>(o[a.name]=a,o),{}),s={};return ee(e.signals).forEach(o=>{pe(r,o.name)?o=Fe(r[o.name],o):i.push(o),s[o.name]=o}),ee(t.signals).forEach(o=>{!pe(s,o.name)&&!pe(r,o.name)&&i.push(o)}),i}function OF(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function RF(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}OF.prototype=RF.prototype={parse(e){return NF(e,this)},fork(){return new RF(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach(t=>{t.$ref=e.id}),e.refs=null),e},proxy(e){const t=e instanceof y7?ye(e):e;return this.add(gle({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;this.root&&(this.root.root=!0);for(e in this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(i,r,s){let o,a;i&&(o=i.data||(i.data={}),a=o[r]||(o[r]=[]),a.push(s))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const i in t.index)n(t.index[i],e,"index:"+i)}return this},pushState(e,t,n){this._encode.push(ye(this.add(Ka({pulse:e})))),this._parent.push(t),this._lookup.push(n?ye(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return Ue(this._parent)},encode(){return Ue(this._encode)},lookup(){return Ue(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(te(e))return Ed(e,t);e.signal||U("Unsupported field reference: "+J(e));const n=e.signal;let i=this.field[n];if(!i){const r={name:this.signalRef(n)};t&&(r.as=t),this.field[n]=i=ye(this.add(sle(r)))}return i},compareRef(e){let t=!1;const n=s=>jt(s)?(t=!0,this.signalRef(s.signal)):Wae(s)?(t=!0,this.exprRef(s.expr)):s,i=ee(e.field).map(n),r=ee(e.order).map(n);return t?ye(this.add(eF({fields:i,orders:r}))):ZM(i,r)},keyRef(e,t){let n=!1;const i=s=>jt(s)?(n=!0,ye(r[s.signal])):s,r=this.signals;return e=ee(e).map(i),n?ye(this.add(ole({fields:e,flat:t}))):Bae(e,t)},sortRef(e){if(!e)return e;const t=K0(e.op,e.field),n=e.order||jae;return n.signal?ye(this.add(eF({fields:t,orders:this.signalRef(n.signal)}))):ZM(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:e,type:t}),this.events[n]=i}return this.events[n]},hasOwnSignal(e){return pe(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&U("Duplicate signal name: "+J(e));const n=t instanceof y7?t:this.add(Z0(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||U("Unrecognized signal name: "+J(e)),this.signals[e]},signalRef(e){return this.signals[e]?ye(this.signals[e]):(pe(this.lambdas,e)||(this.lambdas[e]=this.add(Z0(null))),ye(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t<n;++t){const i=e[t],r=ts(i,this),s=this.lambdas[i];s.params=r.$params,s.update=r.$expr}},property(e){return e&&e.signal?this.signalRef(e.signal):e},objectProperty(e){return!e||!ie(e)?e:this.signalRef(e.signal||I7(e))},exprRef(e,t){const n={expr:ts(e,this)};return t&&(n.expr.$name=t),ye(this.add(ile(n)))},addBinding(e,t){this.bindings||U("Nested signals do not support binding: "+J(e)),this.bindings.push(Fe({signal:e},t))},addScaleProj(e,t){pe(this.scales,e)&&U("Duplicate scale or projection name: "+J(e)),this.scales[e]=this.add(t)},addScale(e,t){this.addScaleProj(e,yle(t))},addProjection(e,t){this.addScaleProj(e,ple(t))},getScale(e){return this.scales[e]||U("Unrecognized scale name: "+J(e)),this.scales[e]},scaleRef(e){return ye(this.getScale(e))},scaleType(e){return this.getScale(e).params.type},projectionRef(e){return this.scaleRef(e)},projectionType(e){return this.scaleType(e)},addData(e,t){return pe(this.data,e)&&U("Duplicate data set name: "+J(e)),this.data[e]=t},getData(e){return this.data[e]||U("Undefined data set name: "+J(e)),this.data[e]},addDataPipeline(e,t){return pe(this.data,e)&&U("Duplicate data set name: "+J(e)),this.addData(e,Qa.fromEntries(this,t))}};function I7(e){return(q(e)?Que:ece)(e)}function Que(e){const t=e.length;let n="[";for(let i=0;i<t;++i){const r=e[i];n+=(i>0?",":"")+(ie(r)?r.signal||I7(r):J(r))}return n+"]"}function ece(e){let t="{",n=0,i,r;for(i in e)r=e[i],t+=(++n>1?",":"")+J(i)+":"+(ie(r)?r.signal||I7(r):J(r));return t+"}"}function tce(){const e="sans-serif",i="#4c78a8",r="#000",s="#888",o="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:2},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:e,fontSize:11},trail:{fill:i,size:2},style:{"guide-label":{fill:r,font:e,fontSize:10},"guide-title":{fill:r,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:o},view:{fill:"transparent"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:s,grid:!1,gridWidth:1,gridColor:o,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:s,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:o,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:s,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function nce(e,t,n){return ie(e)||U("Input Vega specification must be an object."),t=Wl(tce(),t,e.config),Kue(e,new OF(t,n)).toRuntime()}var ice="5.26.1";Fe(au,xG,UK,hJ,QQ,Vee,xne,Qte,wne,Gne,nie,uie);const rce=Object.freeze(Object.defineProperty({__proto__:null,Bounds:Ot,CanvasHandler:Mo,CanvasRenderer:Of,DATE:Kn,DAY:mn,DAYOFYEAR:zr,Dataflow:ou,Debug:H6,Error:r2,EventStream:ap,Gradient:Z$,GroupItem:Zp,HOURS:pi,Handler:To,HybridHandler:O3,HybridRenderer:wg,Info:W6,Item:Yp,MILLISECONDS:Ji,MINUTES:gi,MONTH:gn,Marks:yi,MultiPulse:Q2,None:q6,Operator:gt,Parameters:op,Pulse:ho,QUARTER:Zn,RenderType:Do,Renderer:bi,ResourceLoader:Yb,SECONDS:Fi,SVGHandler:E3,SVGRenderer:xg,SVGStringRenderer:N3,Scenegraph:b3,TIME_UNITS:M2,Transform:I,View:DM,WEEK:It,Warn:s2,YEAR:nn,accessor:Xn,accessorFields:fn,accessorName:Et,array:ee,ascending:Lh,bandwidthNRD:iy,bin:rk,bootstrapCI:sk,boundClip:bC,boundContext:$f,boundItem:y3,boundMark:TE,boundStroke:As,changeset:_a,clampRange:i4,codegenExpression:UT,compare:c2,constant:pn,cumulativeLogNormal:uy,cumulativeNormal:fp,cumulativeUniform:hy,dayofyear:W4,debounce:f2,defaultLocale:G2,definition:tk,densityLogNormal:ly,densityNormal:ry,densityUniform:dy,domChild:Pt,domClear:Ri,domCreate:Ao,domFind:v3,dotbin:ok,error:U,expressionFunction:Ft,extend:Fe,extent:Rr,extentIndex:r4,falsy:ro,fastmap:Gl,field:Ai,flush:s4,font:ug,fontFamily:Tf,fontSize:Vr,format:Qh,formatLocale:Kh,formats:Z2,hasOwnProperty:pe,id:Oc,identity:dn,inferType:I8,inferTypes:z8,ingest:et,inherits:K,inrange:Vl,interpolate:Ib,interpolateColors:Wp,interpolateRange:N$,intersect:pC,intersectBoxLine:_u,intersectPath:n3,intersectPoint:i3,intersectRule:pE,isArray:q,isBoolean:so,isDate:oo,isFunction:Me,isIterable:o4,isNumber:Xe,isObject:ie,isRegExp:a4,isString:te,isTuple:ip,key:d2,lerp:l4,lineHeight:Co,loader:ep,locale:O8,logger:o2,lruCache:u4,markup:F3,merge:c4,mergeConfig:Wl,multiLineOffset:p3,one:ql,pad:f4,panLinear:K6,panLog:J6,panPow:Q6,panSymlog:e4,parse:nce,parseExpression:Hx,parseSelector:Uo,path:bp,pathCurves:qb,pathEqual:vC,pathParse:bu,pathRectangle:iE,pathRender:vf,pathSymbols:nE,pathTrail:rE,peek:Ue,point:fg,projection:Fv,quantileLogNormal:cy,quantileNormal:dp,quantileUniform:py,quantiles:ty,quantizeInterpolator:O$,quarter:t4,quartiles:ny,get random(){return Di},randomInteger:$H,randomKDE:oy,randomLCG:kH,randomLogNormal:lk,randomMixture:uk,randomNormal:sy,randomUniform:ck,read:U8,regressionConstant:gy,regressionExp:dk,regressionLinear:my,regressionLoess:yk,regressionLog:fk,regressionPoly:pk,regressionPow:hk,regressionQuad:yy,renderModule:kg,repeat:Rc,resetDefaultLocale:xW,resetSVGClipId:oE,resetSVGDefIds:oK,responseType:j8,runtimeContext:dM,sampleCurve:pp,sampleLogNormal:ay,sampleNormal:cp,sampleUniform:fy,scale:Ke,sceneEqual:L3,sceneFromJSON:FE,scenePickVisit:ig,sceneToJSON:ME,sceneVisit:nr,sceneZOrder:r3,scheme:zb,serializeXML:tC,setHybridRendererOptions:nK,setRandom:_H,span:Lc,splitAccessPath:Or,stringValue:J,textMetrics:mi,timeBin:u8,timeFloor:K4,timeFormatLocale:Qc,timeInterval:nu,timeOffset:e8,timeSequence:i8,timeUnitSpecifier:q4,timeUnits:D2,toBoolean:h2,toDate:p2,toNumber:hn,toSet:Ki,toString:g2,transform:nk,transforms:au,truncate:d4,truthy:Ti,tupleid:ge,typeParsers:V2,utcFloor:J4,utcInterval:iu,utcOffset:t8,utcSequence:r8,utcdayofyear:V4,utcquarter:n4,utcweek:X4,version:ice,visitArray:ao,week:H4,writeConfig:Hl,zero:io,zoomLinear:a2,zoomLog:l2,zoomPow:Rh,zoomSymlog:u2},Symbol.toStringTag,{value:"Module"}));function sce(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}var oce={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},ace={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},lce={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const uce=Array.prototype.slice,tl=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,uce.call(t,1))},cce=(e,t,n,i,r,s,o)=>new Date(e,t||0,n??1,i||0,r||0,s||0,o||0);var fce={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:cce,date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return tl("join",arguments)},indexof:function(){return tl("indexOf",arguments)},lastindexof:function(){return tl("lastIndexOf",arguments)},slice:function(){return tl("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return tl("substring",arguments,String)},split:function(){return tl("split",arguments,String)},replace:function(){return tl("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const dce=["view","item","group","xy","x","y"],z7=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&z7.add(setImmediate);const hce={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:n==="datum"?e.datum:n==="event"?e.event:n==="item"?e.item:oce[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),z7.has(i[r])){console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`);return}return i[r]},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),i==="if"?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||fce[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>ace[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>lce[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);return e.memberDepth-=1,z7.has(e(i.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):n[r]=e(i.value),n},{})};function Dd(e,t,n,i,r,s){const o=a=>hce[a.type](o,a);return o.memberDepth=0,o.fn=Object.create(t),o.params=n,o.datum=i,o.event=r,o.item=s,dce.forEach(a=>o.fn[a]=function(){return r.vega[a](...arguments)}),o(e)}var pce={operator(e,t){const n=t.ast,i=e.functions;return r=>Dd(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,s)=>Dd(n,i,s,r)},event(e,t){const n=t.ast,i=e.functions;return r=>Dd(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,s)=>{const o=s.item&&s.item.datum;return Dd(n,i,r,o,s)}},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,s=n==="group"||n==="image"||n==="rect";return(o,a)=>{const l=o.datum;let u=0,c;for(const f in i)c=Dd(i[f].ast,r,a,l,void 0,o),o[f]!==c&&(o[f]=c,u=1);return n!=="rule"&&sce(o,i,s),u}}};const gce={name:"vega-lite",author:'Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',version:"5.16.3",collaborators:["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],homepage:"https://vega.github.io/vega-lite/",description:"Vega-Lite is a concise high-level language for interactive visualization.",keywords:["vega","chart","visualization"],main:"build/vega-lite.js",unpkg:"build/vega-lite.min.js",jsdelivr:"build/vega-lite.min.js",module:"build/src/index",types:"build/src/index.d.ts",bin:{vl2pdf:"./bin/vl2pdf",vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2vg:"./bin/vl2vg"},files:["bin","build","src","vega-lite*","tsconfig.json"],scripts:{changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",jest:"NODE_OPTIONS=--experimental-vm-modules npx jest",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test","test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"release-it"},repository:{type:"git",url:"https://github.com/vega/vega-lite.git"},license:"BSD-3-Clause",bugs:{url:"https://github.com/vega/vega-lite/issues"},devDependencies:{"@babel/core":"^7.22.10","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/preset-env":"^7.22.10","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-alias":"^5.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.1","@rollup/plugin-terser":"^0.4.3","@types/chai":"^4.3.5","@types/d3":"^7.4.0","@types/jest":"^29.5.4","@types/pako":"^2.0.0","@typescript-eslint/eslint-plugin":"^6.4.1","@typescript-eslint/parser":"^6.4.1",ajv:"^8.12.0","ajv-formats":"^2.1.1",chai:"^4.3.7",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^4.0.0",d3:"^7.8.5","del-cli":"^5.0.0",eslint:"^8.47.0","eslint-config-prettier":"^9.0.0","eslint-plugin-jest":"^27.2.3","eslint-plugin-prettier":"^5.0.0","fast-json-stable-stringify":"~2.1.0","highlight.js":"^11.8.0",jest:"^29.6.3","jest-dev-server":"^9.0.0",mkdirp:"^3.0.1",pako:"^2.1.0",prettier:"^3.0.2",puppeteer:"^15.0.0","release-it":"^16.1.5",rollup:"^3.28.1","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-sourcemaps":"^0.6.3",serve:"^14.2.1",terser:"^5.19.2","ts-jest":"^29.1.1","ts-json-schema-generator":"^1.3.0",typescript:"~5.2.2","vega-cli":"^5.25.0","vega-datasets":"^2.7.0","vega-embed":"^6.22.2","vega-tooltip":"^0.33.0","yaml-front-matter":"^4.1.1"},dependencies:{"json-stringify-pretty-compact":"~3.0.0",tslib:"~2.6.2","vega-event-selector":"~3.0.1","vega-expression":"~5.1.0","vega-util":"~1.17.2",yargs:"~17.7.2"},peerDependencies:{vega:"^5.24.0"},engines:{node:">=18"}};function P7(e){return!!e.or}function B7(e){return!!e.and}function j7(e){return!!e.not}function l1(e,t){if(j7(e))l1(e.not,t);else if(B7(e))for(const n of e.and)l1(n,t);else if(P7(e))for(const n of e.or)l1(n,t);else t(e)}function Xu(e,t){return j7(e)?{not:Xu(e.not,t)}:B7(e)?{and:e.and.map(n=>Xu(n,t))}:P7(e)?{or:e.or.map(n=>Xu(n,t))}:t(e)}const Ce=structuredClone;function LF(e){throw new Error(e)}function Yu(e,t){const n={};for(const i of t)pe(e,i)&&(n[i]=e[i]);return n}function ri(e,t){const n={...e};for(const i of t)delete n[i];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>ut(e)).join(",")})`};function ze(e){if(Xe(e))return e;const t=te(e)?e:ut(e);if(t.length<250)return t;let n=0;for(let i=0;i<t.length;i++){const r=t.charCodeAt(i);n=(n<<5)-n+r,n=n&n}return n}function U7(e){return e===!1||e===null}function Pe(e,t){return e.includes(t)}function nl(e,t){let n=0;for(const[i,r]of e.entries())if(t(r,i,n++))return!0;return!1}function q7(e,t){let n=0;for(const[i,r]of e.entries())if(!t(r,i,n++))return!1;return!0}function IF(e,...t){for(const n of t)mce(e,n??{});return e}function mce(e,t){for(const n of G(t))Hl(e,n,t[n],!0)}function ns(e,t){const n=[],i={};let r;for(const s of e)r=t(s),!(r in i)&&(i[r]=1,n.push(s));return n}function yce(e,t){const n=G(e),i=G(t);if(n.length!==i.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function zF(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function W7(e,t){for(const n of e)if(t.has(n))return!0;return!1}function H7(e){const t=new Set;for(const n of e){const r=Or(n).map((o,a)=>a===0?o:`[${o}]`),s=r.map((o,a)=>r.slice(0,a+1).join(""));for(const o of s)t.add(o)}return t}function G7(e,t){return e===void 0||t===void 0?!0:W7(H7(e),H7(t))}function lt(e){return G(e).length===0}const G=Object.keys,ln=Object.values,Wo=Object.entries;function Nd(e){return e===!0||e===!1}function _t(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Od(e,t){return j7(e)?`!(${Od(e.not,t)})`:B7(e)?`(${e.and.map(n=>Od(n,t)).join(") && (")})`:P7(e)?`(${e.or.map(n=>Od(n,t)).join(") || (")})`:t(e)}function u1(e,t){if(t.length===0)return!0;const n=t.shift();return n in e&&u1(e[n],t)&&delete e[n],lt(e)}function Rd(e){return e.charAt(0).toUpperCase()+e.substr(1)}function V7(e,t="datum"){const n=Or(e),i=[];for(let r=1;r<=n.length;r++){const s=`[${n.slice(0,r).map(J).join("][")}]`;i.push(`${t}${s}`)}return i.join(" && ")}function PF(e,t="datum"){return`${t}[${J(Or(e).join("."))}]`}function bce(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function ji(e){return`${Or(e).map(bce).join("\\.")}`}function il(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function X7(e){return`${Or(e).join(".")}`}function Zu(e){return e?Or(e).length:0}function Dt(...e){for(const t of e)if(t!==void 0)return t}let BF=42;function jF(e){const t=++BF;return e?String(e)+t:t}function vce(){BF=42}function UF(e){return qF(e)?e:`__${e}`}function qF(e){return e.startsWith("__")}function Ld(e){if(e!==void 0)return(e%360+360)%360}function c1(e){return Xe(e)?!0:!isNaN(e)&&!isNaN(parseFloat(e))}const WF=Object.getPrototypeOf(structuredClone({}));function ki(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor.name!==t.constructor.name)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!ki(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!ki(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==WF.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==WF.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!ki(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ut(e){const t=[];return function n(i){if(i&&i.toJSON&&typeof i.toJSON=="function"&&(i=i.toJSON()),i===void 0)return;if(typeof i=="number")return isFinite(i)?""+i:"null";if(typeof i!="object")return JSON.stringify(i);let r,s;if(Array.isArray(i)){for(s="[",r=0;r<i.length;r++)r&&(s+=","),s+=n(i[r])||"null";return s+"]"}if(i===null)return"null";if(t.includes(i))throw new TypeError("Converting circular structure to JSON");const o=t.push(i)-1,a=Object.keys(i).sort();for(s="",r=0;r<a.length;r++){const l=a[r],u=n(i[l]);u&&(s&&(s+=","),s+=JSON.stringify(l)+":"+u)}return t.splice(o,1),`{${s}}`}(e)}const zs="row",Ps="column",f1="facet",wt="x",Zt="y",pr="x2",is="y2",Ho="xOffset",Ku="yOffset",gr="radius",Bs="radius2",Ui="theta",js="theta2",mr="latitude",yr="longitude",br="latitude2",qi="longitude2",si="color",rs="fill",ss="stroke",oi="shape",Us="size",rl="angle",qs="opacity",Go="fillOpacity",Vo="strokeOpacity",Xo="strokeWidth",Yo="strokeDash",Id="text",Ju="order",zd="detail",d1="key",sl="tooltip",h1="href",p1="url",g1="description",xce={x:1,y:1,x2:1,y2:1},HF={theta:1,theta2:1,radius:1,radius2:1};function GF(e){return e in HF}const Y7={longitude:1,longitude2:1,latitude:1,latitude2:1};function VF(e){switch(e){case mr:return"y";case br:return"y2";case yr:return"x";case qi:return"x2"}}function XF(e){return e in Y7}const _ce=G(Y7),Z7={...xce,...HF,...Y7,xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function Qu(e){return e===si||e===rs||e===ss}const YF={row:1,column:1,facet:1},Wi=G(YF),K7={...Z7,...YF},wce=G(K7),{order:Rve,detail:Lve,tooltip:Ive,...kce}=K7,{row:zve,column:Pve,facet:Bve,...$ce}=kce;function Ece(e){return!!$ce[e]}function ZF(e){return!!K7[e]}const Cce=[pr,is,br,qi,js,Bs];function KF(e){return ol(e)!==e}function ol(e){switch(e){case pr:return wt;case is:return Zt;case br:return mr;case qi:return yr;case js:return Ui;case Bs:return gr}return e}function Zo(e){if(GF(e))switch(e){case Ui:return"startAngle";case js:return"endAngle";case gr:return"outerRadius";case Bs:return"innerRadius"}return e}function os(e){switch(e){case wt:return pr;case Zt:return is;case mr:return br;case yr:return qi;case Ui:return js;case gr:return Bs}}function ai(e){switch(e){case wt:case pr:return"width";case Zt:case is:return"height"}}function JF(e){switch(e){case wt:return"xOffset";case Zt:return"yOffset";case pr:return"x2Offset";case is:return"y2Offset";case Ui:return"thetaOffset";case gr:return"radiusOffset";case js:return"theta2Offset";case Bs:return"radius2Offset"}}function J7(e){switch(e){case wt:return"xOffset";case Zt:return"yOffset"}}function Sce(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const Ace=G(Z7),{x:jve,y:Uve,x2:qve,y2:Wve,xOffset:Hve,yOffset:Gve,latitude:Vve,longitude:Xve,latitude2:Yve,longitude2:Zve,theta:Kve,theta2:Jve,radius:Qve,radius2:exe,...Q7}=Z7,Tce=G(Q7),e_={x:1,y:1},as=G(e_);function Nt(e){return e in e_}const t_={theta:1,radius:1},Mce=G(t_);function m1(e){return e==="width"?wt:Zt}const QF={xOffset:1,yOffset:1};function Pd(e){return e in QF}const{text:txe,tooltip:nxe,href:ixe,url:rxe,description:sxe,detail:oxe,key:axe,order:lxe,...eD}=Q7,Fce=G(eD);function Dce(e){return!!Q7[e]}function Nce(e){switch(e){case si:case rs:case ss:case Us:case oi:case qs:case Xo:case Yo:return!0;case Go:case Vo:case rl:return!1}}const tD={...e_,...t_,...QF,...eD},y1=G(tD);function Ws(e){return!!tD[e]}function Oce(e,t){return Lce(e)[t]}const nD={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:uxe,...Rce}=nD;function Lce(e){switch(e){case si:case rs:case ss:case g1:case zd:case d1:case sl:case h1:case Ju:case qs:case Go:case Vo:case Xo:case f1:case zs:case Ps:return nD;case wt:case Zt:case Ho:case Ku:case mr:case yr:return Rce;case pr:case is:case br:case qi:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case Us:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case Yo:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case oi:return{point:"always",geoshape:"always"};case Id:return{text:"always"};case rl:return{point:"always",square:"always",text:"always"};case p1:return{image:"always"};case Ui:return{text:"always",arc:"always"};case gr:return{text:"always",arc:"always"};case js:case Bs:return{arc:"always"}}}function n_(e){switch(e){case wt:case Zt:case Ui:case gr:case Ho:case Ku:case Us:case rl:case Xo:case qs:case Go:case Vo:case pr:case is:case js:case Bs:return;case f1:case zs:case Ps:case oi:case Yo:case Id:case sl:case h1:case p1:case g1:return"discrete";case si:case rs:case ss:return"flexible";case mr:case yr:case br:case qi:case zd:case d1:case Ju:return}}const Ice={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},zce={count:1,min:1,max:1};function Hs(e){return!!e&&!!e.argmin}function Ko(e){return!!e&&!!e.argmax}function i_(e){return te(e)&&!!Ice[e]}const Pce=new Set(["count","valid","missing","distinct"]);function iD(e){return te(e)&&Pce.has(e)}function Bce(e){return te(e)&&Pe(["min","max"],e)}const jce=new Set(["count","sum","distinct","valid","missing"]),Uce=new Set(["mean","average","median","q1","q3","min","max"]);function rD(e){return so(e)&&(e=I1(e,void 0)),"bin"+G(e).map(t=>b1(e[t])?_t(`_${t}_${Wo(e[t])}`):_t(`_${t}_${e[t]}`)).join("")}function mt(e){return e===!0||al(e)&&!e.binned}function un(e){return e==="binned"||al(e)&&e.binned===!0}function al(e){return ie(e)}function b1(e){return e==null?void 0:e.param}function sD(e){switch(e){case zs:case Ps:case Us:case si:case rs:case ss:case Xo:case qs:case Go:case Vo:case oi:return 6;case Yo:return 4;default:return 10}}function Bd(e){return!!(e!=null&&e.expr)}function li(e){const t=G(e||{}),n={};for(const i of t)n[i]=$i(e[i]);return n}function oD(e){const{anchor:t,frame:n,offset:i,orient:r,angle:s,limit:o,color:a,subtitleColor:l,subtitleFont:u,subtitleFontSize:c,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:h,subtitlePadding:p,...g}=e,m={...g,...a?{fill:a}:{}},y={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...s!==void 0?{angle:s}:{},...o!==void 0?{limit:o}:{}},b={...l?{subtitleColor:l}:{},...u?{subtitleFont:u}:{},...c?{subtitleFontSize:c}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...h?{subtitleLineHeight:h}:{},...p?{subtitlePadding:p}:{}},v=Yu(e,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:v,nonMarkTitleProperties:y,subtitle:b}}function Jo(e){return te(e)||q(e)&&te(e[0])}function de(e){return!!(e!=null&&e.signal)}function Qo(e){return!!e.step}function qce(e){return q(e)?!1:"fields"in e&&!("data"in e)}function Wce(e){return q(e)?!1:"fields"in e&&"data"in e}function Gs(e){return q(e)?!1:"field"in e&&"data"in e}const Hce=G({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),Gce={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},r_=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function aD(e){const t=q(e.condition)?e.condition.map(lD):lD(e.condition);return{...$i(e),condition:t}}function $i(e){if(Bd(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function lD(e){if(Bd(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function vt(e){if(Bd(e)){const{expr:t,...n}=e;return{signal:t,...n}}return de(e)?e:e!==void 0?{value:e}:void 0}function Vce(e){return de(e)?e.signal:J(e)}function uD(e){return de(e)?e.signal:J(e.value)}function vr(e){return de(e)?e.signal:e==null?null:J(e)}function Xce(e,t,n){for(const i of n){const r=Vs(i,t.markDef,t.config);r!==void 0&&(e[i]=vt(r))}return e}function cD(e){return[].concat(e.type,e.style??[])}function it(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:s}=i;return r&&t[r]!==void 0?t[r]:t[e]!==void 0?t[e]:s&&(!r||r===e)?void 0:Vs(e,t,n,i)}function Vs(e,t,n,{vgChannel:i}={}){return Dt(i?v1(e,t,n.style):void 0,v1(e,t,n.style),i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function v1(e,t,n){return fD(e,cD(t),n)}function fD(e,t,n){t=ee(t);let i;for(const r of t){const s=n[r];s&&s[e]!==void 0&&(i=s[e])}return i}function dD(e,t){return ee(e).reduce((n,i)=>(n.field.push(Q(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function hD(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(ki(r,i))return;n.push(i)}),n}function pD(e,t){return ki(e,t)||!t?e:e?[...ee(e),...ee(t)].join(", "):t}function gD(e,t){const n=e.value,i=t.value;if(n==null||i===null)return{explicit:e.explicit,value:null};if((Jo(n)||de(n))&&(Jo(i)||de(i)))return{explicit:e.explicit,value:pD(n,i)};if(Jo(n)||de(n))return{explicit:e.explicit,value:n};if(Jo(i)||de(i))return{explicit:e.explicit,value:i};if(!Jo(n)&&!de(n)&&!Jo(i)&&!de(i))return{explicit:e.explicit,value:hD(n,i)};throw new Error("It should never reach here")}function s_(e){return`Invalid specification ${ut(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Yce='Autosize "fit" only works for single views and layered views.';function mD(e){return`${e=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function yD(e){const t=e=="width"?"Width":"Height",n=e=="width"?"x":"y";return`${t} "container" only works well with autosize "fit" or "fit-${n}".`}function bD(e){return e?`Dropping "fit-${e}" because spec has discrete ${ai(e)}.`:'Dropping "fit" because spec has discrete size.'}function o_(e){return`Unknown field for ${e}. Cannot calculate view size.`}function vD(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Zce(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Kce(e){return`The "nearest" transform is not supported for ${e} marks.`}function xD(e){return`Selection not supported for ${e} yet.`}function Jce(e){return`Cannot find a selection named "${e}".`}const Qce="Scale bindings are currently only supported for scales with unbinned, continuous domains.",efe="Legend bindings are only supported for selections over an individual field or encoding channel.";function tfe(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function nfe(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const ife="The same selection must be used to override scale domains in a layered view.",rfe='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function sfe(e){return`Unknown repeated value "${e}".`}function _D(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const ofe="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function afe(e){return`Unrecognized parse "${e}".`}function wD(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const lfe="Attempt to add the same child twice.";function ufe(e){return`Ignoring an invalid transform: ${ut(e)}.`}const cfe='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function kD(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function ffe(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${ut(t)} is overridden by a child projection ${ut(n)}.`}const dfe="Arc marks uses theta channel rather than angle, replacing angle with theta.";function hfe(e){return`${e}Offset dropped because ${e} is continuous`}function pfe(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${ut(n)}}.`}function $D(e){return`Invalid field type "${e}".`}function gfe(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function mfe(e){return`Invalid aggregation operator "${e}".`}function ED(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function yfe(e){return`Position range does not support relative band size for ${e}.`}function a_(e,t){return`Dropping ${ut(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const bfe="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function x1(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function vfe(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function xfe(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function _fe(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function wfe(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function l_(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t==="ordinal"?"order":"magnitude"}.`}function kfe(e){return`The ${e} for range marks cannot be an expression`}function $fe(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function Efe(e,t){return`Specified orient "${e}" overridden with "${t}".`}function Cfe(e){return`Cannot use the scale property "${e}" with non-color channel.`}function Sfe(e){return`Cannot use the relative band size with ${e} scale.`}function Afe(e){return`Using unaggregated domain with raw field has no effect (${ut(e)}).`}function Tfe(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function Mfe(e){return`Unaggregated domain is currently unsupported for log scale (${ut(e)}).`}function Ffe(e){return`Cannot apply size to non-oriented mark "${e}".`}function Dfe(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function Nfe(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function CD(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function SD(e){return`The step for "${e}" is dropped because the ${e==="width"?"x":"y"} is continuous.`}function Ofe(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${ut(n)} and ${ut(i)}). Using ${ut(n)}.`}function Rfe(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${ut(n)} and ${ut(i)}). Using the union of the two domains.`}function Lfe(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function Ife(e){return`Dropping sort property ${ut(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const AD="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",zfe="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",Pfe="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",Bfe="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function jfe(e){return`Cannot stack "${e}" if there is already "${e}2".`}function Ufe(e){return`Cannot stack non-linear scale (${e}).`}function qfe(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function _1(e,t){return`Invalid ${e}: ${ut(t)}.`}function Wfe(e){return`Dropping day from datetime ${ut(e)} as day cannot be combined with other units.`}function Hfe(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function Gfe(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function Vfe(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function TD(e){return`1D error band does not support ${e}.`}function MD(e){return`Channel ${e} is required for "binned" bin.`}function Xfe(e){return`Channel ${e} should not be used with "binned" bin.`}function Yfe(e){return`Domain for ${e} is required for threshold scale.`}const FD=o2(s2);let ec=FD;function Zfe(e){return ec=e,ec}function Kfe(){return ec=FD,ec}function Y(...e){ec.warn(...e)}function Jfe(...e){ec.debug(...e)}function ll(e){if(e&&ie(e)){for(const t of c_)if(t in e)return!0}return!1}const DD=["january","february","march","april","may","june","july","august","september","october","november","december"],Qfe=DD.map(e=>e.substr(0,3)),ND=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],ede=ND.map(e=>e.substr(0,3));function tde(e){if(c1(e)&&(e=+e),Xe(e))return e>4&&Y(_1("quarter",e)),e-1;throw new Error(_1("quarter",e))}function nde(e){if(c1(e)&&(e=+e),Xe(e))return e-1;{const t=e.toLowerCase(),n=DD.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=Qfe.indexOf(i);if(r!==-1)return r;throw new Error(_1("month",e))}}function ide(e){if(c1(e)&&(e=+e),Xe(e))return e%7;{const t=e.toLowerCase(),n=ND.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=ede.indexOf(i);if(r!==-1)return r;throw new Error(_1("day",e))}}function u_(e,t){const n=[];if(t&&e.day!==void 0&&G(e).length>1&&(Y(Wfe(e)),e=Ce(e),delete e.day),e.year!==void 0?n.push(e.year):n.push(2012),e.month!==void 0){const i=t?nde(e.month):e.month;n.push(i)}else if(e.quarter!==void 0){const i=t?tde(e.quarter):e.quarter;n.push(Xe(i)?i*3:`${i}*3`)}else n.push(0);if(e.date!==void 0)n.push(e.date);else if(e.day!==void 0){const i=t?ide(e.day):e.day;n.push(Xe(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function ul(e){const n=u_(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function rde(e){const n=u_(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function sde(e){const t=u_(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}const OD={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},c_=G(OD);function ode(e){return!!OD[e]}function cl(e){return ie(e)?e.binned:RD(e)}function RD(e){return e&&e.startsWith("binned")}function f_(e){return e.startsWith("utc")}function ade(e){return e.substring(3)}const lde={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function w1(e){return c_.filter(t=>ID(e,t))}function LD(e){const t=w1(e);return t[t.length-1]}function ID(e,t){const n=e.indexOf(t);return!(n<0||n>0&&t==="seconds"&&e.charAt(n-1)==="i"||e.length>n+3&&t==="day"&&e.charAt(n+3)==="o"||n>0&&t==="year"&&e.charAt(n-1)==="f")}function ude(e,t,{end:n}={end:!1}){const i=V7(t),r=f_(e)?"utc":"";function s(l){return l==="quarter"?`(${r}quarter(${i})-1)`:`${r}${l}(${i})`}let o;const a={};for(const l of c_)ID(e,l)&&(a[l]=s(l),o=l);return n&&(a[o]+="+1"),rde(a)}function zD(e){if(!e)return;const t=w1(e);return`timeUnitSpecifier(${ut(t)}, ${ut(lde)})`}function cde(e,t,n){if(!e)return;const i=zD(e);return`${n||f_(e)?"utc":"time"}Format(${t}, ${i})`}function Kt(e){if(!e)return;let t;return te(e)?RD(e)?t={unit:e.substring(6),binned:!0}:t={unit:e}:ie(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),f_(t.unit)&&(t.utc=!0,t.unit=ade(t.unit)),t}function fde(e){const{utc:t,...n}=Kt(e);return n.unit?(t?"utc":"")+G(n).map(i=>_t(`${i==="unit"?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+G(n).map(i=>_t(`_${i}_${n[i]}`)).join("")}function PD(e,t=n=>n){const n=Kt(e),i=LD(n.unit);if(i&&i!=="day"){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:s,part:o}=BD(i,n.step),a={...r,[o]:+r[o]+s};return`${t(ul(a))} - ${t(ul(r))}`}}const dde={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function hde(e){return!!dde[e]}function BD(e,t=1){if(hde(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:t*3};case"week":return{part:"date",step:t*7}}}function pde(e){return e==null?void 0:e.param}function d_(e){return!!(e!=null&&e.field)&&e.equal!==void 0}function h_(e){return!!(e!=null&&e.field)&&e.lt!==void 0}function p_(e){return!!(e!=null&&e.field)&&e.lte!==void 0}function g_(e){return!!(e!=null&&e.field)&&e.gt!==void 0}function m_(e){return!!(e!=null&&e.field)&&e.gte!==void 0}function y_(e){if(e!=null&&e.field){if(q(e.range)&&e.range.length===2)return!0;if(de(e.range))return!0}return!1}function b_(e){return!!(e!=null&&e.field)&&(q(e.oneOf)||q(e.in))}function gde(e){return!!(e!=null&&e.field)&&e.valid!==void 0}function jD(e){return b_(e)||d_(e)||y_(e)||h_(e)||g_(e)||p_(e)||m_(e)}function ls(e,t){return z1(e,{timeUnit:t,wrapTime:!0})}function mde(e,t){return e.map(n=>ls(n,t))}function UD(e,t=!0){const{field:n}=e,i=Kt(e.timeUnit),{unit:r,binned:s}=i||{},o=Q(e,{expr:"datum"}),a=r?`time(${s?o:ude(r,n)})`:o;if(d_(e))return`${a}===${ls(e.equal,r)}`;if(h_(e)){const l=e.lt;return`${a}<${ls(l,r)}`}else if(g_(e)){const l=e.gt;return`${a}>${ls(l,r)}`}else if(p_(e)){const l=e.lte;return`${a}<=${ls(l,r)}`}else if(m_(e)){const l=e.gte;return`${a}>=${ls(l,r)}`}else{if(b_(e))return`indexof([${mde(e.oneOf,r).join(",")}], ${a}) !== -1`;if(gde(e))return v_(a,e.valid);if(y_(e)){const{range:l}=e,u=de(l)?{signal:`${l.signal}[0]`}:l[0],c=de(l)?{signal:`${l.signal}[1]`}:l[1];if(u!==null&&c!==null&&t)return"inrange("+a+", ["+ls(u,r)+", "+ls(c,r)+"])";const f=[];return u!==null&&f.push(`${a} >= ${ls(u,r)}`),c!==null&&f.push(`${a} <= ${ls(c,r)}`),f.length>0?f.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${ut(e)}`)}function v_(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function yde(e){return jD(e)&&e.timeUnit?{...e,timeUnit:Kt(e.timeUnit)}:e}const jd={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function bde(e){return e==="quantitative"||e==="temporal"}function qD(e){return e==="ordinal"||e==="nominal"}const fl=jd.quantitative,x_=jd.ordinal,tc=jd.temporal,__=jd.nominal,nc=jd.geojson;function vde(e){if(e)switch(e=e.toLowerCase(),e){case"q":case fl:return"quantitative";case"t":case tc:return"temporal";case"o":case x_:return"ordinal";case"n":case __:return"nominal";case nc:return"geojson"}}const ui={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},w_={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function xde(e,t){const n=w_[e],i=w_[t];return n===i||n==="ordinal-position"&&i==="time"||i==="ordinal-position"&&n==="time"}const _de={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function WD(e){return _de[e]}const HD=new Set(["linear","log","pow","sqrt","symlog"]),GD=new Set([...HD,"time","utc"]);function VD(e){return HD.has(e)}const XD=new Set(["quantile","quantize","threshold"]),wde=new Set([...GD,...XD,"sequential","identity"]),kde=new Set(["ordinal","bin-ordinal","point","band"]);function Jt(e){return kde.has(e)}function Ei(e){return wde.has(e)}function xr(e){return GD.has(e)}function ic(e){return XD.has(e)}const $de={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function Ede(e){return!te(e)&&!!e.name}function YD(e){return e==null?void 0:e.param}function Cde(e){return e==null?void 0:e.unionWith}function Sde(e){return ie(e)&&"field"in e}const Ade={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:fxe,domain:dxe,range:hxe,rangeMax:pxe,rangeMin:gxe,scheme:mxe,...Tde}=Ade,Mde=G(Tde);function k_(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return xr(e)||e==="band"||e==="point";case"padding":case"rangeMin":case"rangeMax":return xr(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return e==="band";case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return xr(e);case"nice":return xr(e)||e==="quantize"||e==="threshold";case"exponent":return e==="pow";case"base":return e==="log";case"constant":return e==="symlog";case"zero":return Ei(e)&&!Pe(["log","time","utc","threshold","quantile"],e)}}function ZD(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return Qu(e)?void 0:Cfe(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function Fde(e,t){return Pe([x_,__],t)?e===void 0||Jt(e):t===tc?Pe([ui.TIME,ui.UTC,void 0],e):t===fl?VD(e)||ic(e)||e===void 0:!0}function Dde(e,t,n=!1){if(!Ws(e))return!1;switch(e){case wt:case Zt:case Ho:case Ku:case Ui:case gr:return xr(t)||t==="band"?!0:t==="point"?!n:!1;case Us:case Xo:case qs:case Go:case Vo:case rl:return xr(t)||ic(t)||Pe(["band","point","ordinal"],t);case si:case rs:case ss:return t!=="band";case Yo:case oi:return t==="ordinal"||ic(t)}}const jn={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},KD=jn.arc,k1=jn.area,$1=jn.bar,Nde=jn.image,E1=jn.line,C1=jn.point,Ode=jn.rect,S1=jn.rule,JD=jn.text,$_=jn.tick,Rde=jn.trail,E_=jn.circle,C_=jn.square,QD=jn.geoshape;function ea(e){return["line","area","trail"].includes(e)}function Ud(e){return["rect","bar","image","arc"].includes(e)}const Lde=new Set(G(jn));function us(e){return e.type}const Ide=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],zde=["fill","fillOpacity"],Pde=[...Ide,...zde],eN=G({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),Bde={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]},jde={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},tN=G({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function dl(e){return e&&e.band!=null}const Ude={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},nN=5,qde={binSpacing:1,continuousBandSize:nN,minBandSize:.25,timeUnitBandPosition:.5},Wde={binSpacing:0,continuousBandSize:nN,minBandSize:.25,timeUnitBandPosition:.5},Hde={thickness:1};function Gde(e){return us(e)?e.type:e}function S_(e){const{channel:t,channelDef:n,markDef:i,scale:r,config:s}=e,o=T_(e);return Z(n)&&!iD(n.aggregate)&&r&&xr(r.get("type"))?Vde({fieldDef:n,channel:t,markDef:i,ref:o,config:s}):o}function Vde({fieldDef:e,channel:t,markDef:n,ref:i,config:r}){return ea(n.type)?i:it("invalid",n,r)===null?[Xde(e,t),i]:i}function Xde(e,t){const n=A_(e,!0),r=ol(t)==="y"?{field:{group:"height"}}:{value:0};return{test:n,...r}}function A_(e,t=!0){return v_(te(e)?e:Q(e,{expr:"datum"}),!t)}function Yde(e){const{datum:t}=e;return ll(t)?ul(t):`${ut(t)}`}function hl(e,t,n,i){const r={};if(t&&(r.scale=t),fs(e)){const{datum:s}=e;ll(s)?r.signal=ul(s):de(s)?r.signal=s.signal:Bd(s)?r.signal=s.expr:r.value=s}else r.field=Q(e,n);if(i){const{offset:s,band:o}=i;s&&(r.offset=s),o&&(r.band=o)}return r}function A1({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,endSuffix:s="end",bandPosition:o=.5}){const a=!de(o)&&0<o&&o<1?"datum":void 0,l=Q(t,{expr:a,suffix:r}),u=n!==void 0?Q(n,{expr:a}):Q(t,{suffix:s,expr:a}),c={};if(o===0||o===1){c.scale=e;const f=o===0?l:u;c.field=f}else{const f=de(o)?`(1-${o.signal}) * ${l} + ${o.signal} * ${u}`:`${1-o} * ${l} + ${o} * ${u}`;c.signal=`scale("${e}", ${f})`}return i&&(c.offset=i),c}function Zde({scaleName:e,fieldDef:t}){const n=Q(t,{expr:"datum"}),i=Q(t,{expr:"datum",suffix:"end"});return`abs(scale("${e}", ${i}) - scale("${e}", ${n}))`}function T_({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:l,defaultRef:u,bandPosition:c}){if(t){if(Se(t)){const f=o==null?void 0:o.get("type");if(Un(t)){c??(c=ta({fieldDef:t,fieldDef2:n,markDef:i,config:r}));const{bin:d,timeUnit:h,type:p}=t;if(mt(d)||c&&h&&p===tc)return a!=null&&a.impute?hl(t,s,{binSuffix:"mid"},{offset:l}):c&&!Jt(f)?A1({scaleName:s,fieldOrDatumDef:t,bandPosition:c,offset:l}):hl(t,s,Vd(t,e)?{binSuffix:"range"}:{},{offset:l});if(un(d)){if(Z(n))return A1({scaleName:s,fieldOrDatumDef:t,fieldOrDatumDef2:n,bandPosition:c,offset:l});Y(MD(e===wt?pr:is))}}return hl(t,s,Jt(f)?{binSuffix:"range"}:{},{offset:l,band:f==="band"?c??t.bandPosition??.5:void 0})}else if(wr(t)){const f=t.value,d=l?{offset:l}:{};return{...qd(e,f),...d}}}return Me(u)&&(u=u()),u&&{...u,...l?{offset:l}:{}}}function qd(e,t){return Pe(["x","x2"],e)&&t==="width"?{field:{group:"width"}}:Pe(["y","y2"],e)&&t==="height"?{field:{group:"height"}}:vt(t)}function pl(e){return e&&e!=="number"&&e!=="time"}function iN(e,t,n){return`${e}(${t}${n?`, ${ut(n)}`:""})`}const Kde=" – ";function M_({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s}){var l,u;if(pl(n))return _r({fieldOrDatumDef:e,format:t,formatType:n,expr:i,config:s});const o=rN(e,i,r),a=rc(e);if(t===void 0&&n===void 0&&s.customFormatTypes){if(a==="quantitative"){if(r&&s.normalizedNumberFormatType)return _r({fieldOrDatumDef:e,format:s.normalizedNumberFormat,formatType:s.normalizedNumberFormatType,expr:i,config:s});if(s.numberFormatType)return _r({fieldOrDatumDef:e,format:s.numberFormat,formatType:s.numberFormatType,expr:i,config:s})}if(a==="temporal"&&s.timeFormatType&&Z(e)&&e.timeUnit===void 0)return _r({fieldOrDatumDef:e,format:s.timeFormat,formatType:s.timeFormatType,expr:i,config:s})}if(lc(e)){const c=Qde({field:o,timeUnit:Z(e)?(l=Kt(e.timeUnit))==null?void 0:l.unit:void 0,format:t,formatType:s.timeFormatType,rawTimeFormat:s.timeFormat,isUTCScale:gl(e)&&((u=e.scale)==null?void 0:u.type)===ui.UTC});return c?{signal:c}:void 0}if(t=F_({type:a,specifiedFormat:t,config:s,normalizeStack:r}),Z(e)&&mt(e.bin)){const c=Q(e,{expr:i,binSuffix:"end"});return{signal:Wd(o,c,t,n,s)}}else return t||rc(e)==="quantitative"?{signal:`${aN(o,t)}`}:{signal:`isValid(${o}) ? ${o} : ""+${o}`}}function rN(e,t,n){return Z(e)?n?`${Q(e,{expr:t,suffix:"end"})}-${Q(e,{expr:t,suffix:"start"})}`:Q(e,{expr:t}):Yde(e)}function _r({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s,field:o}){if(o??(o=rN(e,i,r)),o!=="datum.value"&&Z(e)&&mt(e.bin)){const a=Q(e,{expr:i,binSuffix:"end"});return{signal:Wd(o,a,t,n,s)}}return{signal:iN(n,o,t)}}function sN(e,t,n,i,r,s){var o;if(!(te(i)&&pl(i))&&!(n===void 0&&i===void 0&&r.customFormatTypes&&rc(e)==="quantitative"&&(r.normalizedNumberFormatType&&sc(e)&&e.stack==="normalize"||r.numberFormatType))){if(sc(e)&&e.stack==="normalize"&&r.normalizedNumberFormat)return F_({type:"quantitative",config:r,normalizeStack:!0});if(lc(e)){const a=Z(e)?(o=Kt(e.timeUnit))==null?void 0:o.unit:void 0;return a===void 0&&r.customFormatTypes&&r.timeFormatType?void 0:Jde({specifiedFormat:n,timeUnit:a,config:r,omitTimeFormatConfig:s})}return F_({type:t,specifiedFormat:n,config:r})}}function oN(e,t,n){var i;if(e&&(de(e)||e==="number"||e==="time"))return e;if(lc(t)&&n!=="time"&&n!=="utc")return Z(t)&&((i=Kt(t==null?void 0:t.timeUnit))!=null&&i.utc)?"utc":"time"}function F_({type:e,specifiedFormat:t,config:n,normalizeStack:i}){if(te(t))return t;if(e===fl)return i?n.normalizedNumberFormat:n.numberFormat}function Jde({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:i}){return e||(t?{signal:zD(t)}:i?void 0:n.timeFormat)}function aN(e,t){return`format(${e}, "${t||""}")`}function lN(e,t,n,i){return pl(n)?iN(n,e,t):aN(e,(te(t)?t:void 0)??i.numberFormat)}function Wd(e,t,n,i,r){if(n===void 0&&i===void 0&&r.customFormatTypes&&r.numberFormatType)return Wd(e,t,r.numberFormat,r.numberFormatType,r);const s=lN(e,n,i,r),o=lN(t,n,i,r);return`${v_(e,!1)} ? "null" : ${s} + "${Kde}" + ${o}`}function Qde({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:r,isUTCScale:s}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:(n=te(n)?n:r,`${s?"utc":"time"}Format(${e}, '${n}')`):cde(t,e,s)}const T1="min",ehe={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function uN(e){return e in ehe}function cN(e){return!!(e!=null&&e.encoding)}function cs(e){return e&&(e.op==="count"||!!e.field)}function fN(e){return e&&q(e)}function Hd(e){return"row"in e||"column"in e}function D_(e){return!!e&&"header"in e}function M1(e){return"facet"in e}function the(e){return e.param}function nhe(e){return e&&!te(e)&&"repeat"in e}function dN(e){const{field:t,timeUnit:n,bin:i,aggregate:r}=e;return{...n?{timeUnit:n}:{},...i?{bin:i}:{},...r?{aggregate:r}:{},field:t}}function N_(e){return"sort"in e}function ta({fieldDef:e,fieldDef2:t,markDef:n,config:i}){if(Se(e)&&e.bandPosition!==void 0)return e.bandPosition;if(Z(e)){const{timeUnit:r,bin:s}=e;if(r&&!t)return Vs("timeUnitBandPosition",n,i);if(mt(s))return .5}}function hN({channel:e,fieldDef:t,fieldDef2:n,markDef:i,config:r,scaleType:s,useVlSizeChannel:o}){var u,c,f;const a=ai(e),l=it(o?"size":a,i,r,{vgChannel:a});if(l!==void 0)return l;if(Z(t)){const{timeUnit:d,bin:h}=t;if(d&&!n)return{band:Vs("timeUnitBandSize",i,r)};if(mt(h)&&!Jt(s))return{band:1}}if(Ud(i.type))return s?Jt(s)?((u=r[i.type])==null?void 0:u.discreteBandSize)||{band:1}:(c=r[i.type])==null?void 0:c.continuousBandSize:(f=r[i.type])==null?void 0:f.discreteBandSize}function pN(e,t,n,i){return mt(e.bin)||e.timeUnit&&Un(e)&&e.type==="temporal"?ta({fieldDef:e,fieldDef2:t,markDef:n,config:i})!==void 0:!1}function gN(e){return e&&!!e.sort&&!e.field}function F1(e){return e&&"condition"in e}function D1(e){const t=e==null?void 0:e.condition;return!!t&&!q(t)&&Z(t)}function Gd(e){const t=e==null?void 0:e.condition;return!!t&&!q(t)&&Se(t)}function ihe(e){const t=e==null?void 0:e.condition;return!!t&&(q(t)||wr(t))}function Z(e){return e&&(!!e.field||e.aggregate==="count")}function rc(e){return e==null?void 0:e.type}function fs(e){return e&&"datum"in e}function na(e){return Un(e)&&!O1(e)||N1(e)}function mN(e){return Un(e)&&e.type==="quantitative"&&!e.bin||N1(e)}function N1(e){return fs(e)&&Xe(e.datum)}function Se(e){return Z(e)||fs(e)}function Un(e){return e&&("field"in e||e.aggregate==="count")&&"type"in e}function wr(e){return e&&"value"in e&&"value"in e}function gl(e){return e&&("scale"in e||"sort"in e)}function sc(e){return e&&("axis"in e||"stack"in e||"impute"in e)}function yN(e){return e&&"legend"in e}function bN(e){return e&&("format"in e||"formatType"in e)}function rhe(e){return ri(e,["legend","axis","header","scale"])}function she(e){return"op"in e}function Q(e,t={}){let n=e.field;const i=t.prefix;let r=t.suffix,s="";if(ahe(e))n=UF("count");else{let o;if(!t.nofn)if(she(e))o=e.op;else{const{bin:a,aggregate:l,timeUnit:u}=e;mt(a)?(o=rD(a),r=(t.binSuffix??"")+(t.suffix??"")):l?Ko(l)?(s=`["${n}"]`,n=`argmax_${l.argmax}`):Hs(l)?(s=`["${n}"]`,n=`argmin_${l.argmin}`):o=String(l):u&&!cl(u)&&(o=fde(u),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}o&&(n=n?`${o}_${n}`:o)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?X7(n):t.expr?PF(n,t.expr)+s:ji(n)+s}function O1(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Z(e)&&!!e.bin;case"temporal":return!1}throw new Error($D(e.type))}function ohe(e){var t;return gl(e)&&ic((t=e.scale)==null?void 0:t.type)}function ahe(e){return e.aggregate==="count"}function lhe(e,t){var o;const{field:n,bin:i,timeUnit:r,aggregate:s}=e;if(s==="count")return t.countTitle;if(mt(i))return`${n} (binned)`;if(r&&!cl(r)){const a=(o=Kt(r))==null?void 0:o.unit;if(a)return`${n} (${w1(a).join("-")})`}else if(s)return Ko(s)?`${n} for max ${s.argmax}`:Hs(s)?`${n} for min ${s.argmin}`:`${Rd(s)} of ${n}`;return n}function uhe(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(Ko(t))return`${r} for argmax(${t.argmax})`;if(Hs(t))return`${r} for argmin(${t.argmin})`;const s=i&&!cl(i)?Kt(i):void 0,o=t||(s==null?void 0:s.unit)||(s==null?void 0:s.maxbins)&&"timeunit"||mt(n)&&"bin";return o?`${o.toUpperCase()}(${r})`:r}const vN=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return uhe(e);default:return lhe(e,t)}};let xN=vN;function _N(e){xN=e}function che(){_N(vN)}function oc(e,t,{allowDisabling:n,includeDefault:i=!0}){var a;const r=(a=O_(e))==null?void 0:a.title;if(!Z(e))return r??e.title;const s=e,o=i?R_(s,t):void 0;return n?Dt(r,s.title,o):r??s.title??o}function O_(e){if(sc(e)&&e.axis)return e.axis;if(yN(e)&&e.legend)return e.legend;if(D_(e)&&e.header)return e.header}function R_(e,t){return xN(e,t)}function R1(e){if(bN(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}else{const t=O_(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function fhe(e,t){var s;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(N_(e)&&q(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!Ko(n)&&!Hs(n))return"quantitative";if(gl(e)&&((s=e.scale)!=null&&s.type))switch(w_[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function ds(e){if(Z(e))return e;if(D1(e))return e.condition}function Ut(e){if(Se(e))return e;if(Gd(e))return e.condition}function wN(e,t,n,i={}){if(te(e)||Xe(e)||so(e)){const r=te(e)?"string":Xe(e)?"number":"boolean";return Y(pfe(t,r,e)),{value:e}}return Se(e)?L1(e,t,n,i):Gd(e)?{...e,condition:L1(e.condition,t,n,i)}:e}function L1(e,t,n,i){if(bN(e)){const{format:r,formatType:s,...o}=e;if(pl(s)&&!n.customFormatTypes)return Y(kD(t)),L1(o,t,n,i)}else{const r=sc(e)?"axis":yN(e)?"legend":D_(e)?"header":null;if(r&&e[r]){const{format:s,formatType:o,...a}=e[r];if(pl(o)&&!n.customFormatTypes)return Y(kD(t)),L1({...e,[r]:a},t,n,i)}}return Z(e)?L_(e,t,i):dhe(e)}function dhe(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=Xe(n)?"quantitative":te(n)?"nominal":ll(n)?"temporal":void 0,{...e,type:t}}function L_(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:s,field:o}=e,a={...e};if(!n&&i&&!i_(i)&&!Ko(i)&&!Hs(i)&&(Y(mfe(i)),delete a.aggregate),r&&(a.timeUnit=Kt(r)),o&&(a.field=`${o}`),mt(s)&&(a.bin=I1(s,t)),un(s)&&!Nt(t)&&Y(Xfe(t)),Un(a)){const{type:l}=a,u=vde(l);l!==u&&(a.type=u),l!=="quantitative"&&iD(i)&&(Y(gfe(l,i)),a.type="quantitative")}else if(!KF(t)){const l=fhe(a,t);a.type=l}if(Un(a)){const{compatible:l,warning:u}=hhe(a,t)||{};l===!1&&Y(u)}if(N_(a)&&te(a.sort)){const{sort:l}=a;if(uN(l))return{...a,sort:{encoding:l}};const u=l.substr(1);if(l.charAt(0)==="-"&&uN(u))return{...a,sort:{encoding:u,order:"descending"}}}if(D_(a)){const{header:l}=a;if(l){const{orient:u,...c}=l;if(u)return{...a,header:{...c,labelOrient:l.labelOrient||u,titleOrient:l.titleOrient||u}}}}return a}function I1(e,t){return so(e)?{maxbins:sD(t)}:e==="binned"?{binned:!0}:!e.maxbins&&!e.step?{...e,maxbins:sD(t)}:e}const ac={compatible:!0};function hhe(e,t){const n=e.type;if(n==="geojson"&&t!=="shape")return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case zs:case Ps:case f1:return O1(e)?ac:{compatible:!1,warning:xfe(t)};case wt:case Zt:case Ho:case Ku:case si:case rs:case ss:case Id:case zd:case d1:case sl:case h1:case p1:case rl:case Ui:case gr:case g1:return ac;case yr:case qi:case mr:case br:return n!==fl?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:ac;case qs:case Go:case Vo:case Xo:case Us:case js:case Bs:case pr:case is:return n==="nominal"&&!e.sort?{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`}:ac;case oi:case Yo:return!O1(e)&&!ohe(e)?{compatible:!1,warning:_fe(t)}:ac;case Ju:return e.type==="nominal"&&!("sort"in e)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:ac}}function lc(e){const{formatType:t}=R1(e);return t==="time"||!t&&phe(e)}function phe(e){return e&&(e.type==="temporal"||Z(e)&&!!e.timeUnit)}function z1(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){var l;const s=t&&((l=Kt(t))==null?void 0:l.unit);let o=s||n==="temporal",a;return Bd(e)?a=e.expr:de(e)?a=e.signal:ll(e)?(o=!0,a=ul(e)):(te(e)||Xe(e))&&o&&(a=`datetime(${ut(e)})`,ode(s)&&(Xe(e)&&e<1e4||te(e)&&isNaN(Date.parse(e)))&&(a=ul({[s]:e}))),a?i&&o?`time(${a})`:a:r?void 0:ut(e)}function kN(e,t){const{type:n}=e;return t.map(i=>{const r=Z(e)&&!cl(e.timeUnit)?e.timeUnit:void 0,s=z1(i,{timeUnit:r,type:n,undefinedIfExprNotRequired:!0});return s!==void 0?{signal:s}:i})}function Vd(e,t){return mt(e.bin)?Ws(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const $N={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function Xd(e){return e==null?void 0:e.condition}const EN=["domain","grid","labels","ticks","title"],ghe={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},CN={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},mhe={...CN,style:1,labelExpr:1,encoding:1};function SN(e){return!!mhe[e]}const AN=G({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function Xs(e){return"mark"in e}class P1{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return Xs(t)?Gde(t.mark)===this.name:!1}}function ml(e,t){const n=e&&e[t];return n?q(n)?nl(n,i=>!!i.field):Z(n)||D1(n):!1}function TN(e,t){const n=e&&e[t];return n?q(n)?nl(n,i=>!!i.field):Z(n)||fs(n)||Gd(n):!1}function MN(e,t){if(Nt(t)){const n=e[t];if((Z(n)||fs(n))&&(qD(n.type)||Z(n)&&n.timeUnit)){const i=J7(t);return TN(e,i)}}return!1}function I_(e){return nl(wce,t=>{if(ml(e,t)){const n=e[t];if(q(n))return nl(n,i=>!!i.aggregate);{const i=ds(n);return i&&!!i.aggregate}}return!1})}function FN(e,t){const n=[],i=[],r=[],s=[],o={};return z_(e,(a,l)=>{if(Z(a)){const{field:u,aggregate:c,bin:f,timeUnit:d,...h}=a;if(c||d||f){const p=O_(a),g=p==null?void 0:p.title;let m=Q(a,{forAs:!0});const y={...g?[]:{title:oc(a,t,{allowDisabling:!0})},...h,field:m};if(c){let b;if(Ko(c)?(b="argmax",m=Q({op:"argmax",field:c.argmax},{forAs:!0}),y.field=`${m}.${u}`):Hs(c)?(b="argmin",m=Q({op:"argmin",field:c.argmin},{forAs:!0}),y.field=`${m}.${u}`):c!=="boxplot"&&c!=="errorbar"&&c!=="errorband"&&(b=c),b){const v={op:b,as:m};u&&(v.field=u),s.push(v)}}else if(n.push(m),Un(a)&&mt(f)){if(i.push({bin:f,field:u,as:m}),n.push(Q(a,{binSuffix:"end"})),Vd(a,l)&&n.push(Q(a,{binSuffix:"range"})),Nt(l)){const b={field:`${m}_end`};o[`${l}2`]=b}y.bin="binned",KF(l)||(y.type=fl)}else if(d&&!cl(d)){r.push({timeUnit:d,field:u,as:m});const b=Un(a)&&a.type!==tc&&"time";b&&(l===Id||l===sl?y.formatType=b:Dce(l)?y.legend={formatType:b,...y.legend}:Nt(l)&&(y.axis={formatType:b,...y.axis}))}o[l]=y}else n.push(u),o[l]=e[l]}else o[l]=e[l]}),{bins:i,timeUnits:r,aggregate:s,groupby:n,encoding:o}}function yhe(e,t,n){const i=Oce(t,n);if(i){if(i==="binned"){const r=e[t===pr?wt:Zt];return!!(Z(r)&&Z(e[t])&&un(r.bin))}}else return!1;return!0}function bhe(e,t,n,i){const r={};for(const s of G(e))ZF(s)||Y(vfe(s));for(let s of Ace){if(!e[s])continue;const o=e[s];if(Pd(s)){const a=Sce(s),l=r[a];if(Z(l)&&bde(l.type)&&Z(o)&&!l.timeUnit){Y(hfe(a));continue}}if(s==="angle"&&t==="arc"&&!e.theta&&(Y(dfe),s=Ui),!yhe(e,s,t)){Y(x1(s,t));continue}if(s===Us&&t==="line"){const a=ds(e[s]);if(a!=null&&a.aggregate){Y(bfe);continue}}if(s===si&&(n?"fill"in e:"stroke"in e)){Y(ED("encoding",{fill:"fill"in e,stroke:"stroke"in e}));continue}if(s===zd||s===Ju&&!q(o)&&!wr(o)||s===sl&&q(o)){if(o){if(s===Ju){const a=e[s];if(gN(a)){r[s]=a;continue}}r[s]=ee(o).reduce((a,l)=>(Z(l)?a.push(L_(l,s)):Y(a_(l,s)),a),[])}}else{if(s===sl&&o===null)r[s]=null;else if(!Z(o)&&!fs(o)&&!wr(o)&&!F1(o)&&!de(o)){Y(a_(o,s));continue}r[s]=wN(o,s,i)}}return r}function B1(e,t){const n={};for(const i of G(e)){const r=wN(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function vhe(e){const t=[];for(const n of G(e))if(ml(e,n)){const i=e[n],r=ee(i);for(const s of r)Z(s)?t.push(s):D1(s)&&t.push(s.condition)}return t}function z_(e,t,n){if(e)for(const i of G(e)){const r=e[i];if(q(r))for(const s of r)t.call(n,s,i);else t.call(n,r,i)}}function xhe(e,t,n,i){return e?G(e).reduce((r,s)=>{const o=e[s];return q(o)?o.reduce((a,l)=>t.call(i,a,l,s),r):t.call(i,r,o,s)},n):n}function DN(e,t){return G(t).reduce((n,i)=>{switch(i){case wt:case Zt:case h1:case g1:case p1:case pr:case is:case Ho:case Ku:case Ui:case js:case gr:case Bs:case mr:case yr:case br:case qi:case Id:case oi:case rl:case sl:return n;case Ju:if(e==="line"||e==="trail")return n;case zd:case d1:{const r=t[i];if(q(r)||Z(r))for(const s of ee(r))s.aggregate||n.push(Q(s,{}));return n}case Us:if(e==="trail")return n;case si:case rs:case ss:case qs:case Go:case Vo:case Yo:case Xo:{const r=ds(t[i]);return r&&!r.aggregate&&n.push(Q(r,{})),n}}},[])}function _he(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(q(t)){for(const s of t)s.aggregate?(i||(i=[]),i.push(s)):(r||(r=[]),r.push(s));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return q(r)&&r.length===1&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}function P_(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:o,titlePrefix:a})=>{const l=i?` of ${B_(t)}`:"";return{field:o+t.field,type:t.type,title:de(a)?{signal:`${a}"${escape(l)}"`}:a+l}}),s=vhe(n).map(rhe);return{tooltip:[...r,...ns(s,ze)]}}function B_(e){const{title:t,field:n}=e;return Dt(t,n)}function j_(e,t,n,i,r){const{scale:s,axis:o}=n;return({partName:a,mark:l,positionPrefix:u,endPositionPrefix:c=void 0,extraEncoding:f={}})=>{const d=B_(n);return NN(e,a,r,{mark:l,encoding:{[t]:{field:`${u}_${n.field}`,type:n.type,...d!==void 0?{title:d}:{},...s!==void 0?{scale:s}:{},...o!==void 0?{axis:o}:{}},...te(c)?{[`${t}2`]:{field:`${c}_${n.field}`}}:{},...i,...f}})}}function NN(e,t,n,i){const{clip:r,color:s,opacity:o}=e,a=e.type;return e[t]||e[t]===void 0&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...s?{color:s}:{},...o?{opacity:o}:{},...us(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...so(e[t])?{}:e[t]}}]:[]}function ON(e,t,n){const{encoding:i}=e,r=t==="vertical"?"y":"x",s=i[r],o=i[`${r}2`],a=i[`${r}Error`],l=i[`${r}Error2`];return{continuousAxisChannelDef:j1(s,n),continuousAxisChannelDef2:j1(o,n),continuousAxisChannelDefError:j1(a,n),continuousAxisChannelDefError2:j1(l,n),continuousAxis:r}}function j1(e,t){if(e!=null&&e.aggregate){const{aggregate:n,...i}=e;return n!==t&&Y(Vfe(n,t)),i}else return e}function RN(e,t){const{mark:n,encoding:i}=e,{x:r,y:s}=i;if(us(n)&&n.orient)return n.orient;if(na(r)){if(na(s)){const o=Z(r)&&r.aggregate,a=Z(s)&&s.aggregate;if(!o&&a===t)return"vertical";if(!a&&o===t)return"horizontal";if(o===t&&a===t)throw new Error("Both x and y cannot have aggregate");return lc(s)&&!lc(r)?"horizontal":"vertical"}return"horizontal"}else{if(na(s))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}}const U1="boxplot",whe=["box","median","outliers","rule","ticks"],khe=new P1(U1,IN);function LN(e){return Xe(e)?"tukey":e}function IN(e,{config:t}){e={...e,encoding:B1(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:s,...o}=e,a=us(n)?n:{type:n};r&&Y(xD("boxplot"));const l=a.extent??t.boxplot.extent,u=it("size",a,t),c=a.invalid,f=LN(l),{bins:d,timeUnits:h,transform:p,continuousAxisChannelDef:g,continuousAxis:m,groupby:y,aggregate:b,encodingWithoutContinuousAxis:v,ticksOrient:x,boxOrient:_,customTooltipWithoutAggregatedField:k}=$he(e,l,t),{color:w,size:$,...S}=v,E=Hn=>j_(a,m,g,Hn,t.boxplot),A=E(S),R=E(v),C=E({...S,...$?{size:$}:{}}),M=P_([{fieldPrefix:f==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:f==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],g,v),T={type:"tick",color:"black",opacity:1,orient:x,invalid:c,aria:!1},O=f==="min-max"?M:P_([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],g,v),P=[...A({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:O}),...A({partName:"rule",mark:{type:"rule",invalid:c,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:O}),...A({partName:"ticks",mark:T,positionPrefix:"lower_whisker",extraEncoding:O}),...A({partName:"ticks",mark:T,positionPrefix:"upper_whisker",extraEncoding:O})],j=[...f!=="tukey"?P:[],...R({partName:"box",mark:{type:"bar",...u?{size:u}:{},orient:_,invalid:c,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:M}),...C({partName:"median",mark:{type:"tick",invalid:c,...ie(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...u?{size:u}:{},orient:x,aria:!1},positionPrefix:"mid_box",extraEncoding:M})];if(f==="min-max")return{...o,transform:(o.transform??[]).concat(p),layer:j};const W=`datum["lower_box_${g.field}"]`,ne=`datum["upper_box_${g.field}"]`,ae=`(${ne} - ${W})`,ke=`${W} - ${l} * ${ae}`,Ie=`${ne} + ${l} * ${ae}`,Le=`datum["${g.field}"]`,We={joinaggregate:zN(g.field),groupby:y},Wn={transform:[{filter:`(${ke} <= ${Le}) && (${Le} <= ${Ie})`},{aggregate:[{op:"min",field:g.field,as:`lower_whisker_${g.field}`},{op:"max",field:g.field,as:`upper_whisker_${g.field}`},{op:"min",field:`lower_box_${g.field}`,as:`lower_box_${g.field}`},{op:"max",field:`upper_box_${g.field}`,as:`upper_box_${g.field}`},...b],groupby:y}],layer:P},{tooltip:Mr,...Vi}=S,{scale:se,axis:Te}=g,De=B_(g),V=ri(Te,["title"]),qt=NN(a,"outliers",t.boxplot,{transform:[{filter:`(${Le} < ${ke}) || (${Le} > ${Ie})`}],mark:"point",encoding:{[m]:{field:g.field,type:g.type,...De!==void 0?{title:De}:{},...se!==void 0?{scale:se}:{},...lt(V)?{}:{axis:V}},...Vi,...w?{color:w}:{},...k?{tooltip:k}:{}}})[0];let He;const Cn=[...d,...h,We];return qt?He={transform:Cn,layer:[qt,Wn]}:(He=Wn,He.transform.unshift(...Cn)),{...o,layer:[He,{transform:p,layer:j}]}}function zN(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}function $he(e,t,n){const i=RN(e,U1),{continuousAxisChannelDef:r,continuousAxis:s}=ON(e,i,U1),o=r.field,a=LN(t),l=[...zN(o),{op:"median",field:o,as:`mid_box_${o}`},{op:"min",field:o,as:(a==="min-max"?"lower_whisker_":"min_")+o},{op:"max",field:o,as:(a==="min-max"?"upper_whisker_":"max_")+o}],u=a==="min-max"||a==="tukey"?[]:[{calculate:`datum["upper_box_${o}"] - datum["lower_box_${o}"]`,as:`iqr_${o}`},{calculate:`min(datum["upper_box_${o}"] + datum["iqr_${o}"] * ${t}, datum["max_${o}"])`,as:`upper_whisker_${o}`},{calculate:`max(datum["lower_box_${o}"] - datum["iqr_${o}"] * ${t}, datum["min_${o}"])`,as:`lower_whisker_${o}`}],{[s]:c,...f}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:h}=_he(f),{bins:p,timeUnits:g,aggregate:m,groupby:y,encoding:b}=FN(h,n),v=i==="vertical"?"horizontal":"vertical",x=i,_=[...p,...g,{aggregate:[...m,...l],groupby:y},...u];return{bins:p,timeUnits:g,transform:_,groupby:y,aggregate:m,continuousAxisChannelDef:r,continuousAxis:s,encodingWithoutContinuousAxis:b,ticksOrient:v,boxOrient:x,customTooltipWithoutAggregatedField:d}}const U_="errorbar",Ehe=["ticks","rule"],Che=new P1(U_,PN);function PN(e,{config:t}){e={...e,encoding:B1(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,ticksOrient:o,markDef:a,outerSpec:l,tooltipEncoding:u}=BN(e,U_,t);delete s.size;const c=j_(a,r,i,s,t.errorbar),f=a.thickness,d=a.size,h={type:"tick",orient:o,aria:!1,...f!==void 0?{thickness:f}:{},...d!==void 0?{size:d}:{}},p=[...c({partName:"ticks",mark:h,positionPrefix:"lower",extraEncoding:u}),...c({partName:"ticks",mark:h,positionPrefix:"upper",extraEncoding:u}),...c({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...f!==void 0?{size:f}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u})];return{...l,transform:n,...p.length>1?{layer:p}:{...p[0]}}}function She(e,t){const{encoding:n}=e;if(Ahe(n))return{orient:RN(e,t),inputType:"raw"};const i=The(n),r=Mhe(n),s=n.x,o=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,l=n.y2;if(Se(a)&&Se(l))throw new Error(`${t} cannot have both x2 and y2`);if(Se(a)){if(na(s))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}else if(Se(l)){if(na(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}else{const a=n.xError,l=n.xError2,u=n.yError,c=n.yError2;if(Se(l)&&!Se(a))throw new Error(`${t} cannot have xError2 without xError`);if(Se(c)&&!Se(u))throw new Error(`${t} cannot have yError2 without yError`);if(Se(a)&&Se(u))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(Se(a)){if(na(s))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(Se(u)){if(na(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function Ahe(e){return(Se(e.x)||Se(e.y))&&!Se(e.x2)&&!Se(e.y2)&&!Se(e.xError)&&!Se(e.xError2)&&!Se(e.yError)&&!Se(e.yError2)}function The(e){return Se(e.x2)||Se(e.y2)}function Mhe(e){return Se(e.xError)||Se(e.xError2)||Se(e.yError)||Se(e.yError2)}function BN(e,t,n){const{mark:i,encoding:r,params:s,projection:o,...a}=e,l=us(i)?i:{type:i};s&&Y(xD(t));const{orient:u,inputType:c}=She(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:h,continuousAxisChannelDefError2:p,continuousAxis:g}=ON(e,u,t),{errorBarSpecificAggregate:m,postAggregateCalculates:y,tooltipSummary:b,tooltipTitleWithFieldName:v}=Fhe(l,f,d,h,p,c,t,n),{[g]:x,[g==="x"?"x2":"y2"]:_,[g==="x"?"xError":"yError"]:k,[g==="x"?"xError2":"yError2"]:w,...$}=r,{bins:S,timeUnits:E,aggregate:A,groupby:R,encoding:C}=FN($,n),M=[...A,...m],T=c!=="raw"?[]:R,O=P_(b,f,C,v);return{transform:[...a.transform??[],...S,...E,...M.length===0?[]:[{aggregate:M,groupby:T}],...y],groupby:T,continuousAxisChannelDef:f,continuousAxis:g,encodingWithoutContinuousAxis:C,ticksOrient:u==="vertical"?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:O}}function Fhe(e,t,n,i,r,s,o,a){let l=[],u=[];const c=t.field;let f,d=!1;if(s==="raw"){const h=e.center?e.center:e.extent?e.extent==="iqr"?"median":"mean":a.errorbar.center,p=e.extent?e.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(p==="iqr")&&Y(Gfe(h,p,o)),p==="stderr"||p==="stdev")l=[{op:p,field:c,as:`extent_${c}`},{op:h,field:c,as:`center_${c}`}],u=[{calculate:`datum["center_${c}"] + datum["extent_${c}"]`,as:`upper_${c}`},{calculate:`datum["center_${c}"] - datum["extent_${c}"]`,as:`lower_${c}`}],f=[{fieldPrefix:"center_",titlePrefix:Rd(h)},{fieldPrefix:"upper_",titlePrefix:jN(h,p,"+")},{fieldPrefix:"lower_",titlePrefix:jN(h,p,"-")}],d=!0;else{let g,m,y;p==="ci"?(g="mean",m="ci0",y="ci1"):(g="median",m="q1",y="q3"),l=[{op:m,field:c,as:`lower_${c}`},{op:y,field:c,as:`upper_${c}`},{op:g,field:c,as:`center_${c}`}],f=[{fieldPrefix:"upper_",titlePrefix:oc({field:c,aggregate:y,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:oc({field:c,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:oc({field:c,aggregate:g,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&Y(Hfe(e.center,e.extent)),s==="aggregated-upper-lower"?(f=[],u=[{calculate:`datum["${n.field}"]`,as:`upper_${c}`},{calculate:`datum["${c}"]`,as:`lower_${c}`}]):s==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:c}],u=[{calculate:`datum["${c}"] + datum["${i.field}"]`,as:`upper_${c}`}],r?u.push({calculate:`datum["${c}"] + datum["${r.field}"]`,as:`lower_${c}`}):u.push({calculate:`datum["${c}"] - datum["${i.field}"]`,as:`lower_${c}`}));for(const h of u)f.push({fieldPrefix:h.as.substring(0,6),titlePrefix:il(il(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:u,errorBarSpecificAggregate:l,tooltipSummary:f,tooltipTitleWithFieldName:d}}function jN(e,t,n){return`${Rd(e)} ${n} ${t}`}const q_="errorband",Dhe=["band","borders"],Nhe=new P1(q_,UN);function UN(e,{config:t}){e={...e,encoding:B1(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,markDef:o,outerSpec:a,tooltipEncoding:l}=BN(e,q_,t),u=o,c=j_(u,r,i,s,t.errorband),f=e.encoding.x!==void 0&&e.encoding.y!==void 0;let d={type:f?"area":"rect"},h={type:f?"line":"rule"};const p={...u.interpolate?{interpolate:u.interpolate}:{},...u.tension&&u.interpolate?{tension:u.tension}:{}};return f?(d={...d,...p,ariaRoleDescription:"errorband"},h={...h,...p,aria:!1}):u.interpolate?Y(TD("interpolate")):u.tension&&Y(TD("tension")),{...a,transform:n,layer:[...c({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...c({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:l}),...c({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:l})]}}const qN={};function W_(e,t,n){const i=new P1(e,t);qN[e]={normalizer:i,parts:n}}function Ohe(){return G(qN)}W_(U1,IN,whe),W_(U_,PN,Ehe),W_(q_,UN,Dhe);const Rhe=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],WN={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},HN={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Lhe=G(WN),Ihe=G(HN),GN=G({header:1,headerRow:1,headerColumn:1,headerFacet:1}),VN=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],zhe={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},Phe={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},kr="_vgsid_",Bhe={point:{on:"click",fields:[kr],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function H_(e){return e==="legend"||!!(e!=null&&e.legend)}function G_(e){return H_(e)&&ie(e)}function V_(e){return!!(e!=null&&e.select)}function XN(e){const t=[];for(const n of e||[]){if(V_(n))continue;const{expr:i,bind:r,...s}=n;if(r&&i){const o={...s,bind:r,init:i};t.push(o)}else{const o={...s,...i?{update:i}:{},...r?{bind:r}:{}};t.push(o)}}return t}function jhe(e){return q1(e)||Y_(e)||X_(e)}function X_(e){return"concat"in e}function q1(e){return"vconcat"in e}function Y_(e){return"hconcat"in e}function YN({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function hs(e){return ie(e)&&e.step!==void 0}function ZN(e){return e.view||e.width||e.height}const KN=20,Uhe=G({align:1,bounds:1,center:1,columns:1,spacing:1});function qhe(e,t,n){const i=n[t],r={},{spacing:s,columns:o}=i;s!==void 0&&(r.spacing=s),o!==void 0&&(M1(e)&&!Hd(e.facet)||X_(e))&&(r.columns=o),q1(e)&&(r.columns=1);for(const a of Uhe)if(e[a]!==void 0)if(a==="spacing"){const l=e[a];r[a]=Xe(l)?l:{row:l.row??s,column:l.column??s}}else r[a]=e[a];return r}function Z_(e,t){return e[t]??e[t==="width"?"continuousWidth":"continuousHeight"]}function W1(e,t){const n=H1(e,t);return hs(n)?n.step:JN}function H1(e,t){const n=e[t]??e[t==="width"?"discreteWidth":"discreteHeight"];return Dt(n,{step:e.step})}const JN=20,Whe={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:JN},mark:jde,arc:{},area:{},bar:qde,circle:{},geoshape:{},image:{},line:{},point:{},rect:Wde,rule:{color:"black"},square:{},text:{color:"black"},tick:Hde,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:$de,projection:{},legend:zhe,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Bhe,style:{},title:{},facet:{spacing:KN},concat:{spacing:KN},normalizedNumberFormat:".0%"},Ys=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],QN={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},eO={blue:Ys[0],orange:Ys[1],red:Ys[2],teal:Ys[3],green:Ys[4],yellow:Ys[5],purple:Ys[6],pink:Ys[7],brown:Ys[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Hhe(e={}){return{signals:[{name:"color",value:ie(e)?{...eO,...e}:eO}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function Ghe(e){return{signals:[{name:"fontSize",value:ie(e)?{...QN,...e}:QN}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Vhe(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function tO(e){const t=G(e||{}),n={};for(const i of t){const r=e[i];n[i]=Xd(r)?aD(r):$i(r)}return n}function Xhe(e){const t=G(e),n={};for(const i of t)n[i]=tO(e[i]);return n}const Yhe=[...tN,...AN,...GN,"background","padding","legend","lineBreak","scale","style","title","view"];function nO(e={}){const{color:t,font:n,fontSize:i,selection:r,...s}=e,o=Wl({},Ce(Whe),n?Vhe(n):{},t?Hhe(t):{},i?Ghe(i):{},s||{});r&&Hl(o,"selection",r,!0);const a=ri(o,Yhe);for(const l of["background","lineBreak","padding"])o[l]&&(a[l]=$i(o[l]));for(const l of tN)o[l]&&(a[l]=li(o[l]));for(const l of AN)o[l]&&(a[l]=tO(o[l]));for(const l of GN)o[l]&&(a[l]=li(o[l]));return o.legend&&(a.legend=li(o.legend)),o.scale&&(a.scale=li(o.scale)),o.style&&(a.style=Xhe(o.style)),o.title&&(a.title=li(o.title)),o.view&&(a.view=li(o.view)),a}const Zhe=new Set(["view",...Lde]),Khe=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],Jhe={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...Bde};function Qhe(e){e=Ce(e);for(const t of Khe)delete e[t];if(e.axis)for(const t in e.axis)Xd(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Rhe)delete e.legend[t];if(e.mark){for(const t of eN)delete e.mark[t];e.mark.tooltip&&ie(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(XN(e.params)),delete e.params);for(const t of Zhe){for(const i of eN)delete e[t][i];const n=Jhe[t];if(n)for(const i of n)delete e[t][i];tpe(e,t)}for(const t of Ohe())delete e[t];epe(e);for(const t in e)ie(e[t])&<(e[t])&&delete e[t];return lt(e)?void 0:e}function epe(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=oD(e.title);lt(t)||(e.style["group-title"]={...e.style["group-title"],...t}),lt(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),lt(i)?delete e.title:e.title=i}function tpe(e,t,n,i){const r=i?e[t][i]:e[t];t==="view"&&(n="cell");const s={...r,...e.style[n??t]};lt(s)||(e.style[n??t]=s),i||delete e[t]}function G1(e){return"layer"in e}function npe(e){return"repeat"in e}function ipe(e){return!q(e.repeat)&&e.repeat.layer}class K_{map(t,n){return M1(t)?this.mapFacet(t,n):npe(t)?this.mapRepeat(t,n):Y_(t)?this.mapHConcat(t,n):q1(t)?this.mapVConcat(t,n):X_(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(G1(t))return this.mapLayer(t,n);if(Xs(t))return this.mapUnit(t,n);throw new Error(s_(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(s=>this.map(s,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const rpe={zero:1,center:1,normalize:1};function spe(e){return e in rpe}const ope=new Set([KD,$1,k1,S1,C1,E_,C_,E1,JD,$_]),ape=new Set([$1,k1,KD]);function uc(e){return Z(e)&&rc(e)==="quantitative"&&!e.bin}function iO(e,t,{orient:n,type:i}){const r=t==="x"?"y":"radius",s=t==="x"&&["bar","area"].includes(i),o=e[t],a=e[r];if(Z(o)&&Z(a))if(uc(o)&&uc(a)){if(o.stack)return t;if(a.stack)return r;const l=Z(o)&&!!o.aggregate,u=Z(a)&&!!a.aggregate;if(l!==u)return l?t:r;if(s){if(n==="vertical")return r;if(n==="horizontal")return t}}else{if(uc(o))return t;if(uc(a))return r}else{if(uc(o))return s&&n==="vertical"?void 0:t;if(uc(a))return s&&n==="horizontal"?void 0:r}}function lpe(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function rO(e,t){var g,m;const n=us(e)?e:{type:e},i=n.type;if(!ope.has(i))return null;const r=iO(t,"x",n)||iO(t,"theta",n);if(!r)return null;const s=t[r],o=Z(s)?Q(s,{}):void 0,a=lpe(r),l=[],u=new Set;if(t[a]){const y=t[a],b=Z(y)?Q(y,{}):void 0;b&&b!==o&&(l.push(a),u.add(b))}const c=a==="x"?"xOffset":"yOffset",f=t[c],d=Z(f)?Q(f,{}):void 0;d&&d!==o&&(l.push(c),u.add(d));const h=Tce.reduce((y,b)=>{if(b!=="tooltip"&&ml(t,b)){const v=t[b];for(const x of ee(v)){const _=ds(x);if(_.aggregate)continue;const k=Q(_,{});(!k||!u.has(k))&&y.push({channel:b,fieldDef:_})}}return y},[]);let p;return s.stack!==void 0?so(s.stack)?p=s.stack?"zero":null:p=s.stack:ape.has(i)&&(p="zero"),!p||!spe(p)||I_(t)&&h.length===0?null:(g=s==null?void 0:s.scale)!=null&&g.type&&((m=s==null?void 0:s.scale)==null?void 0:m.type)!==ui.LINEAR?(s!=null&&s.stack&&Y(Ufe(s.scale.type)),null):Se(t[os(r)])?(s.stack!==void 0&&Y(jfe(r)),null):(Z(s)&&s.aggregate&&!jce.has(s.aggregate)&&Y(qfe(s.aggregate)),{groupbyChannels:l,groupbyFields:u,fieldChannel:r,impute:s.impute===null?!1:ea(i),stackBy:h,offset:p})}function sO(e,t,n){const i=li(e),r=it("orient",i,n);if(i.orient=dpe(i.type,t,r),r!==void 0&&r!==i.orient&&Y(Efe(i.orient,r)),i.type==="bar"&&i.orient){const a=it("cornerRadiusEnd",i,n);if(a!==void 0){const l=i.orient==="horizontal"&&t.x2||i.orient==="vertical"&&t.y2?["cornerRadius"]:Ude[i.orient];for(const u of l)i[u]=a;i.cornerRadiusEnd!==void 0&&delete i.cornerRadiusEnd}}return it("opacity",i,n)===void 0&&(i.opacity=cpe(i.type,t)),it("cursor",i,n)===void 0&&(i.cursor=upe(i,t,n)),i}function upe(e,t,n){return t.href||e.href||it("href",e,n)?"pointer":e.cursor}function cpe(e,t){if(Pe([C1,$_,E_,C_],e)&&!I_(t))return .7}function fpe(e,t,{graticule:n}){if(n)return!1;const i=Vs("filled",e,t),r=e.type;return Dt(i,r!==C1&&r!==E1&&r!==S1)}function dpe(e,t,n){switch(e){case C1:case E_:case C_:case JD:case Ode:case Nde:return}const{x:i,y:r,x2:s,y2:o}=t;switch(e){case $1:if(Z(i)&&(un(i.bin)||Z(r)&&r.aggregate&&!i.aggregate))return"vertical";if(Z(r)&&(un(r.bin)||Z(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(o||s){if(n)return n;if(!s)return(Z(i)&&i.type===fl&&!mt(i.bin)||N1(i))&&Z(r)&&un(r.bin)?"horizontal":"vertical";if(!o)return(Z(r)&&r.type===fl&&!mt(r.bin)||N1(r))&&Z(i)&&un(i.bin)?"vertical":"horizontal"}case S1:if(s&&!(Z(i)&&un(i.bin))&&o&&!(Z(r)&&un(r.bin)))return;case k1:if(o)return Z(r)&&un(r.bin)?"horizontal":"vertical";if(s)return Z(i)&&un(i.bin)?"vertical":"horizontal";if(e===S1){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case E1:case $_:{const a=mN(i),l=mN(r);if(n)return n;if(a&&!l)return e!=="tick"?"horizontal":"vertical";if(!a&&l)return e!=="tick"?"vertical":"horizontal";if(a&&l)return"vertical";{const u=Un(i)&&i.type===tc,c=Un(r)&&r.type===tc;if(u&&!c)return"vertical";if(!u&&c)return"horizontal"}return}}return"vertical"}function hpe(e){const{point:t,line:n,...i}=e;return G(i).length>1?i:i.type}function ppe(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:ri(e[t],["point","line"])});return e}function J_(e,t={},n){return e.point==="transparent"?{opacity:0}:e.point?ie(e.point)?e.point:{}:e.point!==void 0?null:t.point||n.shape?ie(t.point)?t.point:{}:void 0}function oO(e,t={}){return e.line?e.line===!0?{}:e.line:e.line!==void 0?null:t.line?t.line===!0?{}:t.line:void 0}class gpe{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(Xs(t)){const{mark:i,encoding:r}=t,s=us(i)?i:{type:i};switch(s.type){case"line":case"rule":case"trail":return!!J_(s,n[s.type],r);case"area":return!!J_(s,n[s.type],r)||!!oO(s,n[s.type])}}return!1}run(t,n,i){const{config:r}=n,{params:s,projection:o,mark:a,name:l,encoding:u,...c}=t,f=B1(u,r),d=us(a)?a:{type:a},h=J_(d,r[d.type],f),p=d.type==="area"&&oO(d,r[d.type]),g=[{name:l,...s?{params:s}:{},mark:hpe({...d.type==="area"&&d.opacity===void 0&&d.fillOpacity===void 0?{opacity:.7}:{},...d}),encoding:ri(f,["shape"])}],m=rO(sO(d,f,r),f);let y=f;if(m){const{fieldChannel:b,offset:v}=m;y={...f,[b]:{...f[b],...v?{stack:v}:{}}}}return y=ri(y,["y2","x2"]),p&&g.push({...o?{projection:o}:{},mark:{type:"line",...Yu(d,["clip","interpolate","tension","tooltip"]),...p},encoding:y}),h&&g.push({...o?{projection:o}:{},mark:{type:"point",opacity:1,filled:!0,...Yu(d,["clip","tooltip"]),...h},encoding:y}),i({...c,layer:g},{...n,config:ppe(r)})}}function mpe(e,t){return t?Hd(e)?cO(e,t):aO(e,t):e}function Q_(e,t){return t?cO(e,t):e}function ew(e,t,n){const i=t[e];if(nhe(i)){if(i.repeat in n)return{...t,[e]:n[i.repeat]};Y(sfe(i.repeat));return}return t}function aO(e,t){if(e=ew("field",e,t),e!==void 0){if(e===null)return null;if(N_(e)&&cs(e.sort)){const n=ew("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function lO(e,t){if(Z(e))return aO(e,t);{const n=ew("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function uO(e,t){if(Se(e)){const n=lO(e,t);if(n)return n;if(F1(e))return{condition:e.condition}}else{if(Gd(e)){const n=lO(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}}function cO(e,t){const n={};for(const i in e)if(pe(e,i)){const r=e[i];if(q(r))n[i]=r.map(s=>uO(s,t)).filter(s=>s);else{const s=uO(r,t);s!==void 0&&(n[i]=s)}}return n}class ype{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(Xs(t)){const{encoding:n,mark:i}=t;if(i==="line"||us(i)&&i.type==="line")for(const r of Cce){const s=ol(r),o=n[s];if(n[r]&&(Z(o)&&!un(o.bin)||fs(o)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:s}=t;return Y($fe(!!r.x2,!!r.y2)),i({...t,mark:ie(s)?{...s,type:"rule"}:"rule"},n)}}class bpe extends K_{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[khe,Che,Nhe,new gpe,new ype]}map(t,n){if(Xs(t)){const i=ml(t.encoding,zs),r=ml(t.encoding,Ps),s=ml(t.encoding,f1);if(i||r||s)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,s=Q_(t.encoding,n.repeater),o={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(l=>l).join("_")}:{},...s?{encoding:s}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(o,n);const a=this.mapLayerOrUnit.bind(this);for(const l of this.nonFacetUnitNormalizers)if(l.hasMatchingType(o,n.config))return l.run(o,n,a);return o}mapRepeat(t,n){return ipe(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...s}=t,{row:o,column:a,layer:l}=i,{repeater:u={},repeaterPrefix:c=""}=n;return o||a?this.mapRepeat({...t,repeat:{...o?{row:o}:{},...a?{column:a}:{}},spec:{repeat:{layer:l},spec:r}},n):{...s,layer:l.map(f=>{const d={...u,layer:f},h=`${(r.name?`${r.name}_`:"")+c}child__layer_${_t(f)}`,p=this.mapLayerOrUnit(r,{...n,repeater:d,repeaterPrefix:h});return p.name=h,p})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:s,...o}=t;!q(i)&&t.columns&&(t=ri(t,["columns"]),Y(_D("repeat")));const a=[],{repeater:l={},repeaterPrefix:u=""}=n,c=!q(i)&&i.row||[l?l.row:null],f=!q(i)&&i.column||[l?l.column:null],d=q(i)&&i||[l?l.repeat:null];for(const p of d)for(const g of c)for(const m of f){const y={repeat:p,row:g,column:m,layer:l.layer},b=(r.name?`${r.name}_`:"")+u+"child__"+(q(i)?`${_t(p)}`:(i.row?`row_${_t(g)}`:"")+(i.column?`column_${_t(m)}`:"")),v=this.map(r,{...n,repeater:y,repeaterPrefix:b});v.name=b,a.push(ri(v,["data"]))}const h=q(i)?t.columns:i.column?i.column.length:1;return{data:r.data??s,align:"all",...o,columns:h,concat:a}}mapFacet(t,n){const{facet:i}=t;return Hd(i)&&t.columns&&(t=ri(t,["columns"]),Y(_D("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:s,parentProjection:o,config:a}=n,l=dO({parentProjection:o,projection:r}),u=fO({parentEncoding:s,encoding:Q_(i,n.repeater)});return this.mapUnit({...t,...l?{projection:l}:{},...u?{encoding:u}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:s,...o}=t.encoding,{mark:a,width:l,projection:u,height:c,view:f,params:d,encoding:h,...p}=t,{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:s},n),y=Q_(o,n.repeater);return this.mapFacet({...p,...m,facet:g,spec:{...l?{width:l}:{},...c?{height:c}:{},...f?{view:f}:{},...u?{projection:u}:{},mark:a,encoding:y,...d?{params:d}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:s}=t;if(i||r){s&&Y(wfe([...i?[zs]:[],...r?[Ps]:[]]));const o={},a={};for(const l of[zs,Ps]){const u=t[l];if(u){const{align:c,center:f,spacing:d,columns:h,...p}=u;o[l]=p;for(const g of["align","center","spacing"])u[g]!==void 0&&(a[g]??(a[g]={}),a[g][l]=u[g])}}return{facetMapping:o,layout:a}}else{const{align:o,center:a,spacing:l,columns:u,...c}=s;return{facetMapping:mpe(c,n.repeater),layout:{...o?{align:o}:{},...a?{center:a}:{},...l?{spacing:l}:{},...u?{columns:u}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:s,projection:o,...a}=t,l={...r,parentEncoding:fO({parentEncoding:n,encoding:s,layer:!0}),parentProjection:dO({parentProjection:i,projection:o})};return super.mapLayer({...a,...t.name?{name:[l.repeaterPrefix,t.name].filter(u=>u).join("_")}:{}},l)}}function fO({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...G(e),...G(t)]);for(const s of r){const o=t[s],a=e[s];if(Se(o)){const l={...a,...o};i[s]=l}else Gd(o)?i[s]={...o,condition:{...a,...o.condition}}:o||o===null?i[s]=o:(n||wr(a)||de(a)||Se(a)||q(a))&&(i[s]=a)}}else i=t;return!i||lt(i)?void 0:i}function dO(e){const{parentProjection:t,projection:n}=e;return t&&n&&Y(ffe({parentProjection:t,projection:n})),n??t}function tw(e){return"filter"in e}function vpe(e){return(e==null?void 0:e.stop)!==void 0}function hO(e){return"lookup"in e}function xpe(e){return"data"in e}function _pe(e){return"param"in e}function wpe(e){return"pivot"in e}function kpe(e){return"density"in e}function $pe(e){return"quantile"in e}function Epe(e){return"regression"in e}function Cpe(e){return"loess"in e}function Spe(e){return"sample"in e}function Ape(e){return"window"in e}function Tpe(e){return"joinaggregate"in e}function Mpe(e){return"flatten"in e}function Fpe(e){return"calculate"in e}function pO(e){return"bin"in e}function Dpe(e){return"impute"in e}function Npe(e){return"timeUnit"in e}function Ope(e){return"aggregate"in e}function Rpe(e){return"stack"in e}function Lpe(e){return"fold"in e}function Ipe(e){return"extent"in e&&!("density"in e)}function zpe(e){return e.map(t=>tw(t)?{filter:Xu(t.filter,yde)}:t)}class Ppe extends K_{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=gO(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if(t=gO(t,n),t.encoding){const i={};for(const[r,s]of Wo(t.encoding))i[r]=mO(s,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:Wo(i).map(([s,o])=>{const{init:a,bind:l,empty:u,...c}=o;c.type==="single"?(c.type="point",c.toggle=!1):c.type==="multi"&&(c.type="point"),n.emptySelections[s]=u!=="none";for(const f of ln(n.selectionPredicates[s]??{}))f.empty=u!=="none";return{name:s,value:a,select:c,bind:l}})}:t}}function gO(e,t){const{transform:n,...i}=e;if(n){const r=n.map(s=>{if(tw(s))return{filter:nw(s,t)};if(pO(s)&&al(s.bin))return{...s,bin:yO(s.bin)};if(hO(s)){const{selection:o,...a}=s.from;return o?{...s,from:{param:o,...a}}:s}return s});return{...i,transform:r}}return e}function mO(e,t){var i,r;const n=Ce(e);if(Z(n)&&al(n.bin)&&(n.bin=yO(n.bin)),gl(n)&&((r=(i=n.scale)==null?void 0:i.domain)!=null&&r.selection)){const{selection:s,...o}=n.scale.domain;n.scale.domain={...o,...s?{param:s}:{}}}if(F1(n))if(q(n.condition))n.condition=n.condition.map(s=>{const{selection:o,param:a,test:l,...u}=s;return a?s:{...u,test:nw(s,t)}});else{const{selection:s,param:o,test:a,...l}=mO(n.condition,t);n.condition=o?n.condition:{...l,test:nw(n.condition,t)}}return n}function yO(e){const t=e.extent;if(t!=null&&t.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function nw(e,t){const n=i=>Xu(i,r=>{var s;const o=t.emptySelections[r]??!0,a={param:r,empty:o};return(s=t.selectionPredicates)[r]??(s[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):Xu(e.test||e.filter,i=>i.selection?n(i.selection):i)}class iw extends K_{map(t,n){const i=n.selections??[];if(t.params&&!Xs(t)){const r=[];for(const s of t.params)V_(s)?i.push(s):r.push(s);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),s=[];for(const o of i)if(!o.views||!o.views.length)s.push(o);else for(const a of o.views)(te(a)&&(a===t.name||r.includes(a))||q(a)&&a.map(l=>r.indexOf(l)).every((l,u,c)=>l!==-1&&(u===0||l>c[u-1])))&&s.push(o);return s.length&&(t.params=s),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=iw.prototype[e];iw.prototype[e]=function(n,i){return t.call(this,n,Bpe(n,i))}}function Bpe(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function bO(e,t){t===void 0&&(t=nO(e.config));const n=Wpe(e,t),{width:i,height:r}=e,s=Hpe(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...s?{autosize:s}:{}}}const jpe=new bpe,Upe=new Ppe,qpe=new iw;function Wpe(e,t={}){const n={config:t};return qpe.map(jpe.map(Upe.map(e,n),n),n)}function vO(e){return te(e)?{type:e}:e??{}}function Hpe(e,t,n){let{width:i,height:r}=t;const s=Xs(e)||G1(e),o={};s?i=="container"&&r=="container"?(o.type="fit",o.contains="padding"):i=="container"?(o.type="fit-x",o.contains="padding"):r=="container"&&(o.type="fit-y",o.contains="padding"):(i=="container"&&(Y(mD("width")),i=void 0),r=="container"&&(Y(mD("height")),r=void 0));const a={type:"pad",...o,...n?vO(n.autosize):{},...vO(e.autosize)};if(a.type==="fit"&&!s&&(Y(Yce),a.type="pad"),i=="container"&&!(a.type=="fit"||a.type=="fit-x")&&Y(yD("width")),r=="container"&&!(a.type=="fit"||a.type=="fit-y")&&Y(yD("height")),!ki(a,{type:"pad"}))return a}function Gpe(e){return e==="fit"||e==="fit-x"||e==="fit-y"}function Vpe(e){return e?`fit-${m1(e)}`:"fit"}const Xpe=["background","padding"];function xO(e,t){const n={};for(const i of Xpe)e&&e[i]!==void 0&&(n[i]=$i(e[i]));return t&&(n.params=e.params),n}class Zs{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new Zs(Ce(this.explicit),Ce(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return Dt(this.explicit[t],this.implicit[t])}getWithExplicit(t){return this.explicit[t]!==void 0?{explicit:!0,value:this.explicit[t]}:this.implicit[t]!==void 0?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){n!==void 0&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){n[t]!==void 0?this.set(t,n[t],!0):i[t]!==void 0&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){n[t]!==void 0&&this.set(t,n[t],!0)}copyAll(t){for(const n of G(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function ps(e){return{explicit:!0,value:e}}function Ci(e){return{explicit:!1,value:e}}function _O(e){return(t,n,i,r)=>{const s=e(t.value,n.value);return s>0?t:s<0?n:V1(t,n,i,r)}}function V1(e,t,n,i){return e.explicit&&t.explicit&&Y(Ofe(n,i,e.value,t.value)),e}function ia(e,t,n,i,r=V1){return e===void 0||e.value===void 0?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:ki(e.value,t.value)?e:r(e,t,n,i)}class Ype extends Zs{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function cc(e){return"url"in e}function Yd(e){return"values"in e}function wO(e){return"name"in e&&!cc(e)&&!Yd(e)&&!ra(e)}function ra(e){return e&&(kO(e)||$O(e)||rw(e))}function kO(e){return"sequence"in e}function $O(e){return"sphere"in e}function rw(e){return"graticule"in e}var yt;(function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"})(yt||(yt={}));function EO(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=ji(r.field),r}function yl(e,t=!0,n=dn){if(q(e)){const i=e.map(r=>yl(r,t,n));return t?`[${i.join(", ")}]`:i}else if(ll(e))return n(t?ul(e):sde(e));return t?n(ut(e)):e}function Zpe(e,t){for(const n of ln(e.component.selection??{})){const i=n.name;let r=`${i}${oa}, ${n.resolve==="global"?"true":`{unit: ${vl(e)}}`}`;for(const s of em)s.defined(n)&&(s.signals&&(t=s.signals(e,n,t)),s.modifyExpr&&(r=s.modifyExpr(e,n,r)));t.push({name:i+Age,on:[{events:{signal:n.name+oa},update:`modify(${J(n.name+bl)}, ${r})`}]})}return sw(t)}function Kpe(e,t){if(e.component.selection&&G(e.component.selection).length){const n=J(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Uo("pointermove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return sw(t)}function Jpe(e,t){let n=!1;for(const i of ln(e.component.selection??{})){const r=i.name,s=J(r+bl);if(t.filter(a=>a.name===r).length===0){const a=i.resolve==="global"?"union":i.resolve,l=i.type==="point"?", true, true)":")";t.push({name:i.name,update:`${eR}(${s}, ${J(a)}${l}`})}n=!0;for(const a of em)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&t.filter(r=>r.name==="unit").length===0&&t.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]}),sw(t)}function Qpe(e,t){const n=[...t],i=vl(e,{escape:!1});for(const r of ln(e.component.selection??{})){const s={name:r.name+bl};if(r.project.hasSelectionId&&(s.transform=[{type:"collect",sort:{field:kr}}]),r.init){const a=r.project.items.map(EO);s.values=r.project.hasSelectionId?r.init.map(l=>({unit:i,[kr]:yl(l,!1)[0]})):r.init.map(l=>({unit:i,fields:a,values:yl(l,!1)}))}n.filter(a=>a.name===r.name+bl).length||n.push(s)}return n}function CO(e,t){for(const n of ln(e.component.selection??{}))for(const i of em)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function ege(e,t){for(const n of e.children)At(n)&&(t=CO(n,t));return t}function tge(e,t,n,i){const r=sR(e,t.param,t);return{signal:Ei(n.get("type"))&&q(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}function sw(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class ot{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){if(this._children.includes(t)){Y(lfe);return}n!==void 0?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class qn extends ot{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${jF()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function ow(e){return e.as!==void 0}function SO(e){return`${e}_end`}class gs extends ot{clone(){return new gs(null,Ce(this.timeUnits))}constructor(t,n){super(t),this.timeUnits=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s,o)=>{const{field:a,timeUnit:l}=s;if(l){let u;if(cl(l)){if(At(n)){const{mark:c,markDef:f,config:d}=n,h=ta({fieldDef:s,markDef:f,config:d});(Ud(c)||h)&&(u={timeUnit:Kt(l),field:a})}}else u={as:Q(s,{forAs:!0}),field:a,timeUnit:l};if(At(n)){const{mark:c,markDef:f,config:d}=n,h=ta({fieldDef:s,markDef:f,config:d});Ud(c)&&Nt(o)&&h!==.5&&(u.rectBandPosition=h)}u&&(r[ze(u)]=u)}return r},{});return lt(i)?null:new gs(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},s=Kt(i),o={...r,timeUnit:s};return new gs(t,{[ze(o)]:o})}merge(t){this.timeUnits={...this.timeUnits};for(const n in t.timeUnits)this.timeUnits[n]||(this.timeUnits[n]=t.timeUnits[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of Wo(this.timeUnits)){const s=ow(r)?r.as:`${r.field}_end`;t.has(s)||(n[i]=r)}this.timeUnits=n}producedFields(){return new Set(ln(this.timeUnits).map(t=>ow(t)?t.as:SO(t.field)))}dependentFields(){return new Set(ln(this.timeUnits).map(t=>t.field))}hash(){return`TimeUnit ${ze(this.timeUnits)}`}assemble(){const t=[];for(const n of ln(this.timeUnits)){const{rectBandPosition:i}=n,r=Kt(n.timeUnit);if(ow(n)){const{field:s,as:o}=n,{unit:a,utc:l,...u}=r,c=[o,`${o}_end`];t.push({field:ji(s),type:"timeunit",...a?{units:w1(a)}:{},...l?{timezone:"utc"}:{},...u,as:c}),t.push(...TO(c,i,r))}else if(n){const{field:s}=n,o=s.replaceAll("\\.","."),a=AO({timeUnit:r,field:o}),l=SO(o);t.push({type:"formula",expr:a,as:l}),t.push(...TO([o,l],i,r))}}return t}}const X1="offsetted_rect_start",Y1="offsetted_rect_end";function AO({timeUnit:e,field:t,reverse:n}){const{unit:i,utc:r}=e,s=LD(i),{part:o,step:a}=BD(s,e.step);return`${r?"utcOffset":"timeOffset"}('${o}', datum['${t}'], ${n?-a:a})`}function TO([e,t],n,i){if(n!==void 0&&n!==.5){const r=`datum['${e}']`,s=`datum['${t}']`;return[{type:"formula",expr:MO([AO({timeUnit:i,field:e,reverse:!0}),r],n+.5),as:`${e}_${X1}`},{type:"formula",expr:MO([r,s],n+.5),as:`${e}_${Y1}`}]}return[]}function MO([e,t],n){return`${1-n} * ${e} + ${n} * ${t}`}const Zd="_tuple_fields";class nge{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const ige={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new nge),s={},o={},a=new Set,l=(p,g)=>{const m=g==="visual"?p.channel:p.field;let y=_t(`${i}_${m}`);for(let b=1;a.has(y);b++)y=_t(`${i}_${m}_${b}`);return a.add(y),{[g]:y}},u=t.type,c=e.config.selection[u],f=n.value!==void 0?ee(n.value):null;let{fields:d,encodings:h}=ie(n.select)?n.select:{};if(!d&&!h&&f){for(const p of f)if(ie(p))for(const g of G(p))Ece(g)?(h||(h=[])).push(g):u==="interval"?(Y(rfe),h=c.encodings):(d??(d=[])).push(g)}!d&&!h&&(h=c.encodings,"fields"in c&&(d=c.fields));for(const p of h??[]){const g=e.fieldDef(p);if(g){let m=g.field;if(g.aggregate){Y(Zce(p,g.aggregate));continue}else if(!m){Y(vD(p));continue}if(g.timeUnit&&!cl(g.timeUnit)){m=e.vgField(p);const y={timeUnit:g.timeUnit,as:m,field:g.field};o[ze(y)]=y}if(!s[m]){const y=u==="interval"&&Ws(p)&&Ei(e.getScaleComponent(p).get("type"))?"R":g.bin?"R-RE":"E",b={field:m,channel:p,type:y,index:r.items.length};b.signals={...l(b,"data"),...l(b,"visual")},r.items.push(s[m]=b),r.hasField[m]=s[m],r.hasSelectionId=r.hasSelectionId||m===kr,XF(p)?(b.geoChannel=p,b.channel=VF(p),r.hasChannel[b.channel]=s[m]):r.hasChannel[p]=s[m]}}else Y(vD(p))}for(const p of d??[]){if(r.hasField[p])continue;const g={type:"E",field:p,index:r.items.length};g.signals={...l(g,"data")},r.items.push(g),r.hasField[p]=g,r.hasSelectionId=r.hasSelectionId||p===kr}f&&(t.init=f.map(p=>r.items.map(g=>ie(p)?p[g.geoChannel||g.channel]!==void 0?p[g.geoChannel||g.channel]:p[g.field]:p))),lt(o)||(r.timeUnit=new gs(null,o))},signals:(e,t,n)=>{const i=t.name+Zd;return n.filter(s=>s.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(EO)})}},Ks={defined:e=>e.type==="interval"&&e.resolve==="global"&&e.bind&&e.bind==="scales",parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!Ws(r))continue;const s=e.getScaleComponent(r),o=s?s.get("type"):void 0;if(!s||!Ei(o)){Y(Qce);continue}s.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(o=>n.filter(a=>a.name===o.signals.data).length===0);if(!e.parent||FO(e)||i.length===0)return n;const r=n.filter(o=>o.name===t.name)[0];let s=r.update;if(s.indexOf(eR)>=0)r.update=`{${i.map(o=>`${J(ji(o.field))}: ${o.signals.data}`).join(", ")}}`;else{for(const o of i){const a=`${J(ji(o.field))}: ${o.signals.data}`;s.includes(a)||(s=`${s.substring(0,s.length-1)}, ${a}}`)}r.update=s}return n.concat(i.map(o=>({name:o.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!FO(e))for(const i of t.scales){const r=n.filter(s=>s.name===i.signals.data)[0];r.push="outer",delete r.value,delete r.update}return n}};function aw(e,t){return`domain(${J(e.scaleName(t))})`}function FO(e){return e.parent&&xc(e.parent)&&!e.parent.parent}const fc="_brush",DO="_scale_trigger",Kd="geo_interval_init_tick",NO="_init",rge="_center",sge={defined:e=>e.type==="interval",parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...ie(n.select)?n.select:{}};r.fields=[kr],r.encodings||(r.encodings=n.value?G(n.value):[yr,mr]),n.select={type:"interval",...r}}if(t.translate&&!Ks.defined(t)){const r=`!event.item || event.item.mark.name !== ${J(t.name+fc)}`;for(const s of t.events){if(!s.between){Y(`${s} is not an ordered event stream for interval selections.`);continue}const o=ee((i=s.between[0]).filter??(i.filter=[]));o.indexOf(r)<0&&o.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+oa,s=ln(t.project.hasChannel).filter(a=>a.channel===wt||a.channel===Zt),o=t.init?t.init[0]:null;if(n.push(...s.reduce((a,l)=>a.concat(oge(e,t,l,o&&o[l.index])),[])),e.hasProjection){const a=J(e.projectionName()),l=e.projectionName()+rge,{x:u,y:c}=t.project.hasChannel,f=u&&u.signals.visual,d=c&&c.signals.visual,h=u?o&&o[u.index]:`${l}[0]`,p=c?o&&o[c.index]:`${l}[1]`,g=_=>e.getSizeSignalRef(_).signal,m=`[[${f?f+"[0]":"0"}, ${d?d+"[0]":"0"}],[${f?f+"[1]":g("width")}, ${d?d+"[1]":g("height")}]]`;o&&(n.unshift({name:i+NO,init:`[scale(${a}, [${u?h[0]:h}, ${c?p[0]:p}]), scale(${a}, [${u?h[1]:h}, ${c?p[1]:p}])]`}),(!u||!c)&&(n.find(k=>k.name===l)||n.unshift({name:l,update:`invert(${a}, [${g("width")}/2, ${g("height")}/2])`})));const y=`intersect(${m}, {markname: ${J(e.getName("marks"))}}, unit.mark)`,b=`{unit: ${vl(e)}}`,v=`vlSelectionTuples(${y}, ${b})`,x=s.map(_=>_.signals.visual);return n.concat({name:r,on:[{events:[...x.length?[{signal:x.join(" || ")}]:[],...o?[{signal:Kd}]:[]],update:v}]})}else{if(!Ks.defined(t)){const u=i+DO,c=s.map(f=>{const d=f.channel,{data:h,visual:p}=f.signals,g=J(e.scaleName(d)),m=e.getScaleComponent(d).get("type"),y=Ei(m)?"+":"";return`(!isArray(${h}) || (${y}invert(${g}, ${p})[0] === ${y}${h}[0] && ${y}invert(${g}, ${p})[1] === ${y}${h}[1]))`});c.length&&n.push({name:u,value:{},on:[{events:s.map(f=>({scale:e.scaleName(f.channel)})),update:c.join(" && ")+` ? ${u} : {}`}]})}const a=s.map(u=>u.signals.data),l=`unit: ${vl(e)}, fields: ${i+Zd}, values`;return n.concat({name:r,...o?{init:`{${l}: ${yl(o)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${l}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(At(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===Kd).length||n.unshift({name:Kd,value:null,on:[{events:"timer{1}",update:`${Kd} === null ? {} : ${Kd}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:s}=t.project.hasChannel,o=r==null?void 0:r.signals.visual,a=s==null?void 0:s.signals.visual,l=`data(${J(t.name+bl)})`;if(Ks.defined(t)||!r&&!s)return n;const u={x:r!==void 0?{signal:`${o}[0]`}:{value:0},y:s!==void 0?{signal:`${a}[0]`}:{value:0},x2:r!==void 0?{signal:`${o}[1]`}:{field:{group:"width"}},y2:s!==void 0?{signal:`${a}[1]`}:{field:{group:"height"}}};if(t.resolve==="global")for(const g of G(u))u[g]=[{test:`${l}.length && ${l}[0].unit === ${vl(e)}`,...u[g]},{value:0}];const{fill:c,fillOpacity:f,cursor:d,...h}=t.mark,p=G(h).reduce((g,m)=>(g[m]=[{test:[r!==void 0&&`${o}[0] !== ${o}[1]`,s!==void 0&&`${a}[0] !== ${a}[1]`].filter(y=>y).join(" && "),value:h[m]},{value:null}],g),{});return[{name:`${i+fc}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:c},fillOpacity:{value:f}},update:u}},...n,{name:i+fc,type:"rect",clip:!0,encode:{enter:{...d?{cursor:{value:d}}:{},fill:{value:"transparent"}},update:{...u,...p}}}]}};function oge(e,t,n,i){const r=!e.hasProjection,s=n.channel,o=n.signals.visual,a=J(r?e.scaleName(s):e.projectionName()),l=d=>`scale(${a}, ${d})`,u=e.getSizeSignalRef(s===wt?"width":"height").signal,c=`${s}(unit)`,f=t.events.reduce((d,h)=>[...d,{events:h.between[0],update:`[${c}, ${c}]`},{events:h,update:`[${o}[0], clamp(${c}, 0, ${u})]`}],[]);if(r){const d=n.signals.data,h=Ks.defined(t),p=e.getScaleComponent(s),g=p?p.get("type"):void 0,m=i?{init:yl(i,!0,l)}:{value:[]};return f.push({events:{signal:t.name+DO},update:Ei(g)?`[${l(`${d}[0]`)}, ${l(`${d}[1]`)}]`:"[0, 0]"}),h?[{name:d,on:[]}]:[{name:o,...m,on:f},{name:d,...i?{init:yl(i)}:{},on:[{events:{signal:o},update:`${o}[0] === ${o}[1] ? null : invert(${a}, ${o})`}]}]}else{const d=s===wt?0:1,h=t.name+NO,p=i?{init:`[${h}[0][${d}], ${h}[1][${d}]]`}:{value:[]};return[{name:o,...p,on:f}]}}const age={defined:e=>e.type==="point",signals:(e,t,n)=>{const i=t.name,r=i+Zd,s=t.project,o="(item().isVoronoi ? datum.datum : datum)",a=ln(e.component.selection??{}).reduce((f,d)=>d.type==="interval"?f.concat(d.name+fc):f,[]).map(f=>`indexof(item().mark.name, '${f}') < 0`).join(" && "),l=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${a?` && ${a}`:""}`;let u=`unit: ${vl(e)}, `;if(t.project.hasSelectionId)u+=`${kr}: ${o}[${J(kr)}]`;else{const f=s.items.map(d=>{const h=e.fieldDef(d.channel);return h!=null&&h.bin?`[${o}[${J(e.vgField(d.channel,{}))}], ${o}[${J(e.vgField(d.channel,{binSuffix:"end"}))}]]`:`${o}[${J(d.field)}]`}).join(", ");u+=`fields: ${r}, values: [${f}]`}const c=t.events;return n.concat([{name:i+oa,on:c?[{events:c,update:`${l} ? {${u}} : null`,force:!0}]:[]}])}};function dc(e,t,n,i){const r=F1(t)&&t.condition,s=i(t);if(r){const a=ee(r).map(l=>{const u=i(l);if(the(l)){const{param:c,empty:f}=l;return{test:rR(e,{param:c,empty:f}),...u}}else return{test:tm(e,l.test),...u}});return{[n]:[...a,...s!==void 0?[s]:[]]}}else return s!==void 0?{[n]:s}:{}}function lw(e,t="text"){const n=e.encoding[t];return dc(e,n,t,i=>Z1(i,e.config))}function Z1(e,t,n="datum"){if(e){if(wr(e))return vt(e.value);if(Se(e)){const{format:i,formatType:r}=R1(e);return M_({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function OO(e,t={}){const{encoding:n,markDef:i,config:r,stack:s}=e,o=n.tooltip;if(q(o))return{tooltip:LO({tooltip:o},s,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return dc(e,o,"tooltip",l=>{const u=Z1(l,r,a);if(u)return u;if(l===null)return;let c=it("tooltip",i,r);if(c===!0&&(c={content:"encoding"}),te(c))return{value:c};if(ie(c))return de(c)?c:c.content==="encoding"?LO(n,s,r,t):{signal:a}})}}function RO(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},s={},o=i?"datum.datum":"datum",a=[];function l(c,f){const d=ol(f),h=Un(c)?c:{...c,type:e[d].type},p=h.title||R_(h,r),g=ee(p).join(", ").replaceAll(/"/g,'\\"');let m;if(Nt(f)){const y=f==="x"?"x2":"y2",b=ds(e[y]);if(un(h.bin)&&b){const v=Q(h,{expr:o}),x=Q(b,{expr:o}),{format:_,formatType:k}=R1(h);m=Wd(v,x,_,k,r),s[y]=!0}}if((Nt(f)||f===Ui||f===gr)&&t&&t.fieldChannel===f&&t.offset==="normalize"){const{format:y,formatType:b}=R1(h);m=M_({fieldOrDatumDef:h,format:y,formatType:b,expr:o,config:r,normalizeStack:!0}).signal}m??(m=Z1(h,r,o).signal),a.push({channel:f,key:g,value:m})}z_(e,(c,f)=>{Z(c)?l(c,f):D1(c)&&l(c.condition,f)});const u={};for(const{channel:c,key:f,value:d}of a)!s[c]&&!u[f]&&(u[f]=d);return u}function LO(e,t,n,{reactiveGeom:i}={}){const r=RO(e,t,n,{reactiveGeom:i}),s=Wo(r).map(([o,a])=>`"${o}": ${a}`);return s.length>0?{signal:`{${s.join(", ")}}`}:void 0}function lge(e){const{markDef:t,config:n}=e,i=it("aria",t,n);return i===!1?{}:{...i?{aria:i}:{},...uge(e),...cge(e)}}function uge(e){const{mark:t,markDef:n,config:i}=e;if(i.aria===!1)return{};const r=it("ariaRoleDescription",n,i);return r!=null?{ariaRoleDescription:{value:r}}:t in Gce?{}:{ariaRoleDescription:{value:t}}}function cge(e){const{encoding:t,markDef:n,config:i,stack:r}=e,s=t.description;if(s)return dc(e,s,"description",l=>Z1(l,e.config));const o=it("description",n,i);if(o!=null)return{description:vt(o)};if(i.aria===!1)return{};const a=RO(t,r,i);if(!lt(a))return{description:{signal:Wo(a).map(([l,u],c)=>`"${c>0?"; ":""}${l}: " + (${u})`).join(" + ")}}}function Qt(e,t,n={}){const{markDef:i,encoding:r,config:s}=t,{vgChannel:o}=n;let{defaultRef:a,defaultValue:l}=n;a===void 0&&(l??(l=it(e,i,s,{vgChannel:o,ignoreVgConfig:!0})),l!==void 0&&(a=vt(l)));const u=r[e];return dc(t,u,o??e,c=>T_({channel:e,channelDef:c,markDef:i,config:s,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:a}))}function IO(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:s}=n,o=t.filled??it("filled",n,r),a=Pe(["bar","point","circle","square","geoshape"],s)?"transparent":void 0,l=it(o===!0?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[o===!0&&"color"]??a,u=it(o===!1?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[o===!1&&"color"],c=o?"fill":"stroke",f={...l?{fill:vt(l)}:{},...u?{stroke:vt(u)}:{}};return n.color&&(o?n.fill:n.stroke)&&Y(ED("property",{fill:"fill"in n,stroke:"stroke"in n})),{...f,...Qt("color",e,{vgChannel:c,defaultValue:o?l:u}),...Qt("fill",e,{defaultValue:i.fill?l:void 0}),...Qt("stroke",e,{defaultValue:i.stroke?u:void 0})}}function fge(e){const{encoding:t,mark:n}=e,i=t.order;return!ea(n)&&wr(i)?dc(e,i,"zindex",r=>vt(r.value)):{}}function hc({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const s=`${e}Offset`,o=t[s],a=n[s];if((s==="xOffset"||s==="yOffset")&&a)return{offsetType:"encoding",offset:T_({channel:s,channelDef:a,markDef:t,config:i==null?void 0:i.config,scaleName:i.scaleName(s),scale:i.getScaleComponent(s),stack:null,defaultRef:vt(o),bandPosition:r})};const l=t[s];return l?{offsetType:"visual",offset:l}:{}}function $n(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:s,config:o,stack:a}=t,l=r[e],u=r[os(e)],c=t.scaleName(e),f=t.getScaleComponent(e),{offset:d,offsetType:h}=hc({channel:e,markDef:s,encoding:r,model:t,bandPosition:.5}),p=uw({model:t,defaultPos:n,channel:e,scaleName:c,scale:f}),g=!l&&Nt(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:dge({channel:e,channelDef:l,channel2Def:u,markDef:s,config:o,scaleName:c,scale:f,stack:a,offset:d,defaultRef:p,bandPosition:h==="encoding"?0:void 0});return g?{[i||e]:g}:void 0}function dge(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:s,markDef:o}=e;if(Se(n)&&r&&t===r.fieldChannel){if(Z(n)){let a=n.bandPosition;if(a===void 0&&o.type==="text"&&(t==="radius"||t==="theta")&&(a=.5),a!==void 0)return A1({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:s})}return hl(n,i,{suffix:"end"},{offset:s})}return S_(e)}function uw({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:s,config:o}=e;return()=>{const a=ol(n),l=Zo(n),u=it(n,s,o,{vgChannel:l});if(u!==void 0)return qd(n,u);switch(t){case"zeroOrMin":case"zeroOrMax":if(i){const c=r.get("type");if(!Pe([ui.LOG,ui.TIME,ui.UTC],c)){if(r.domainDefinitelyIncludesZero())return{scale:i,value:0}}}if(t==="zeroOrMin")return a==="y"?{field:{group:"height"}}:{value:0};switch(a){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[ai(n)],mult:.5}}}}const hge={left:"x",center:"xc",right:"x2"},pge={top:"y",middle:"yc",bottom:"y2"};function zO(e,t,n,i="middle"){if(e==="radius"||e==="theta")return Zo(e);const r=e==="x"?"align":"baseline",s=it(r,t,n);let o;return de(s)?(Y(kfe(r)),o=void 0):o=s,e==="x"?hge[o||(i==="top"?"left":"center")]:pge[o||i]}function K1(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?PO(e,t,{defaultPos:n,defaultPos2:i}):$n(e,t,{defaultPos:n})}function PO(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:s}=t,o=os(e),a=ai(e),l=gge(t,i,o),u=l[a]?zO(e,r,s):Zo(e);return{...$n(e,t,{defaultPos:n,vgChannel:u}),...l}}function gge(e,t,n){const{encoding:i,mark:r,markDef:s,stack:o,config:a}=e,l=ol(n),u=ai(n),c=Zo(n),f=i[l],d=e.scaleName(l),h=e.getScaleComponent(l),{offset:p}=n in i||n in s?hc({channel:n,markDef:s,encoding:i,model:e}):hc({channel:l,markDef:s,encoding:i,model:e});if(!f&&(n==="x2"||n==="y2")&&(i.latitude||i.longitude)){const m=ai(n),y=e.markDef[m];return y!=null?{[m]:{value:y}}:{[c]:{field:e.getName(n)}}}const g=mge({channel:n,channelDef:f,channel2Def:i[n],markDef:s,config:a,scaleName:d,scale:h,stack:o,offset:p,defaultRef:void 0});return g!==void 0?{[c]:g}:J1(n,s)||J1(n,{[n]:v1(n,s,a.style),[u]:v1(u,s,a.style)})||J1(n,a[r])||J1(n,a.mark)||{[c]:uw({model:e,defaultPos:t,channel:n,scaleName:d,scale:h})()}}function mge({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:l,defaultRef:u}){return Se(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?hl(t,s,{suffix:"start"},{offset:l}):S_({channel:e,channelDef:n,scaleName:s,scale:o,stack:a,markDef:i,config:r,offset:l,defaultRef:u})}function J1(e,t){const n=ai(e),i=Zo(e);if(t[i]!==void 0)return{[i]:qd(e,t[i])};if(t[e]!==void 0)return{[i]:qd(e,t[e])};if(t[n]){const r=t[n];if(dl(r))Y(yfe(n));else return{[n]:qd(e,r)}}}function sa(e,t){const{config:n,encoding:i,markDef:r}=e,s=r.type,o=os(t),a=ai(t),l=i[t],u=i[o],c=e.getScaleComponent(t),f=c?c.get("type"):void 0,d=r.orient,h=i[a]??i.size??it("size",r,n,{vgChannel:a}),p=JF(t),g=s==="bar"&&(t==="x"?d==="vertical":d==="horizontal");return Z(l)&&(mt(l.bin)||un(l.bin)||l.timeUnit&&!u)&&!(h&&!dl(h))&&!i[p]&&!Jt(f)?vge({fieldDef:l,fieldDef2:u,channel:t,model:e}):(Se(l)&&Jt(f)||g)&&!u?bge(l,t,e):PO(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function yge(e,t,n,i,r,s,o){if(dl(r))if(n){const l=n.get("type");if(l==="band"){let u=`bandwidth('${t}')`;r.band!==1&&(u=`${r.band} * ${u}`);const c=Vs("minBandSize",{type:o},i);return{signal:c?`max(${vr(c)}, ${u})`:u}}else r.band!==1&&(Y(Sfe(l)),r=void 0)}else return{mult:r.band,field:{group:e}};else{if(de(r))return r;if(r)return{value:r}}if(n){const l=n.get("range");if(Qo(l)&&Xe(l.step))return{value:l.step-2}}if(!s){const{bandPaddingInner:l,barBandPaddingInner:u,rectBandPaddingInner:c}=i.scale,f=Dt(l,o==="bar"?u:c);if(de(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(Xe(f))return{signal:`${1-f} * ${e}`}}return{value:W1(i.view,e)-2}}function bge(e,t,n){var S,E;const{markDef:i,encoding:r,config:s,stack:o}=n,a=i.orient,l=n.scaleName(t),u=n.getScaleComponent(t),c=ai(t),f=os(t),d=JF(t),h=n.scaleName(d),p=n.getScaleComponent(J7(t)),g=a==="horizontal"&&t==="y"||a==="vertical"&&t==="x";let m;(r.size||i.size)&&(g?m=Qt("size",n,{vgChannel:c,defaultRef:vt(i.size)}):Y(Ffe(i.type)));const y=!!m,b=hN({channel:t,fieldDef:e,markDef:i,config:s,scaleType:(S=u||p)==null?void 0:S.get("type"),useVlSizeChannel:g});m=m||{[c]:yge(c,h||l,p||u,s,b,!!e,i.type)};const v=((E=u||p)==null?void 0:E.get("type"))==="band"&&dl(b)&&!y?"top":"middle",x=zO(t,i,s,v),_=x==="xc"||x==="yc",{offset:k,offsetType:w}=hc({channel:t,markDef:i,encoding:r,model:n,bandPosition:_?.5:0}),$=S_({channel:t,channelDef:e,markDef:i,config:s,scaleName:l,scale:u,stack:o,offset:k,defaultRef:uw({model:n,defaultPos:"mid",channel:t,scaleName:l,scale:u}),bandPosition:_?w==="encoding"?0:.5:de(b)?{signal:`(1-${b})/2`}:dl(b)?(1-b.band)/2:0});if(c)return{[x]:$,...m};{const A=Zo(f),R=m[c],C=k?{...R,offset:k}:R;return{[x]:$,[A]:q($)?[$[0],{...$[1],offset:C}]:{...$,offset:C}}}}function BO(e,t,n,i,r,s,o){if(GF(e))return 0;const a=e==="x"||e==="y2",l=a?-t/2:t/2;if(de(n)||de(r)||de(i)||s){const u=vr(n),c=vr(r),f=vr(i),d=vr(s),p=s?`(${o} < ${d} ? ${a?"":"-"}0.5 * (${d} - (${o})) : ${l})`:l,g=f?`${f} + `:"",m=u?`(${u} ? -1 : 1) * `:"",y=c?`(${c} + ${p})`:p;return{signal:g+m+y}}else return r=r||0,i+(n?-r-l:+r+l)}function vge({fieldDef:e,fieldDef2:t,channel:n,model:i}){var E;const{config:r,markDef:s,encoding:o}=i,a=i.getScaleComponent(n),l=i.scaleName(n),u=a?a.get("type"):void 0,c=a.get("reverse"),f=hN({channel:n,fieldDef:e,markDef:s,config:r,scaleType:u}),d=(E=i.component.axes[n])==null?void 0:E[0],h=(d==null?void 0:d.get("translate"))??.5,p=Nt(n)?it("binSpacing",s,r)??0:0,g=os(n),m=Zo(n),y=Zo(g),b=Vs("minBandSize",s,r),{offset:v}=hc({channel:n,markDef:s,encoding:o,model:i,bandPosition:0}),{offset:x}=hc({channel:g,markDef:s,encoding:o,model:i,bandPosition:0}),_=Zde({fieldDef:e,scaleName:l}),k=BO(n,p,c,h,v,b,_),w=BO(g,p,c,h,x??v,b,_),$=de(f)?{signal:`(1-${f.signal})/2`}:dl(f)?(1-f.band)/2:.5,S=ta({fieldDef:e,fieldDef2:t,markDef:s,config:r});if(mt(e.bin)||e.timeUnit){const A=e.timeUnit&&S!==.5;return{[y]:jO({fieldDef:e,scaleName:l,bandPosition:$,offset:w,useRectOffsetField:A}),[m]:jO({fieldDef:e,scaleName:l,bandPosition:de($)?{signal:`1-${$.signal}`}:1-$,offset:k,useRectOffsetField:A})}}else if(un(e.bin)){const A=hl(e,l,{},{offset:w});if(Z(t))return{[y]:A,[m]:hl(t,l,{},{offset:k})};if(al(e.bin)&&e.bin.step)return{[y]:A,[m]:{signal:`scale("${l}", ${Q(e,{expr:"datum"})} + ${e.bin.step})`,offset:k}}}Y(MD(g))}function jO({fieldDef:e,scaleName:t,bandPosition:n,offset:i,useRectOffsetField:r}){return A1({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i,...r?{startSuffix:X1,endSuffix:Y1}:{}})}const xge=new Set(["aria","width","height"]);function Hi(e,t){const{fill:n=void 0,stroke:i=void 0}=t.color==="include"?IO(e):{};return{..._ge(e.markDef,t),...UO(e,"fill",n),...UO(e,"stroke",i),...Qt("opacity",e),...Qt("fillOpacity",e),...Qt("strokeOpacity",e),...Qt("strokeWidth",e),...Qt("strokeDash",e),...fge(e),...OO(e),...lw(e,"href"),...lge(e)}}function UO(e,t,n){const{config:i,mark:r,markDef:s}=e;if(it("invalid",s,i)==="hide"&&n&&!ea(r)){const a=wge(e,{invalid:!0,channels:y1});if(a)return{[t]:[{test:a,value:null},...ee(n)]}}return n?{[t]:n}:{}}function _ge(e,t){return Hce.reduce((n,i)=>(!xge.has(i)&&e[i]!==void 0&&t[i]!=="ignore"&&(n[i]=vt(e[i])),n),{})}function wge(e,{invalid:t=!1,channels:n}){const i=n.reduce((s,o)=>{const a=e.getScaleComponent(o);if(a){const l=a.get("type"),u=e.vgField(o,{expr:"datum"});u&&Ei(l)&&(s[u]=!0)}return s},{}),r=G(i);if(r.length>0){const s=t?"||":"&&";return r.map(o=>A_(o,t)).join(` ${s} `)}}function cw(e){const{config:t,markDef:n}=e;if(it("invalid",n,t)){const r=kge(e,{channels:as});if(r)return{defined:{signal:r}}}return{}}function kge(e,{invalid:t=!1,channels:n}){const i=n.reduce((s,o)=>{var l;const a=e.getScaleComponent(o);if(a){const u=a.get("type"),c=e.vgField(o,{expr:"datum",binSuffix:(l=e.stack)!=null&&l.impute?"mid":void 0});c&&Ei(u)&&(s[c]=!0)}return s},{}),r=G(i);if(r.length>0){const s=t?"||":"&&";return r.map(o=>A_(o,t)).join(` ${s} `)}}function qO(e,t){if(t!==void 0)return{[e]:vt(t)}}const fw="voronoi",WO={defined:e=>e.type==="point"&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(fw)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,s=e.mark;if(ea(s))return Y(Kce(s)),n;const o={name:e.getName(fw),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...OO(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,l=!1;return n.forEach((u,c)=>{const f=u.name??"";f===e.component.mark[0].name?a=c:f.indexOf(fw)>=0&&(l=!0)}),l||n.splice(a+1,0,o),n}},HO={defined:e=>e.type==="point"&&e.resolve==="global"&&e.bind&&e.bind!=="scales"&&!H_(e.bind),parse:(e,t,n)=>tR(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,s=t.bind,o=t.init&&t.init[0],a=WO.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((l,u)=>{const c=_t(`${i}_${l.field}`);n.filter(d=>d.name===c).length||n.unshift({name:c,...o?{init:yl(o[u])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${J(l.field)}] : null`}]:[],bind:s[l.field]??s[l.channel]??s})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.filter(u=>u.name===i+oa)[0],o=i+Zd,a=r.items.map(u=>_t(`${i}_${u.field}`)),l=a.map(u=>`${u} !== null`).join(" && ");return a.length&&(s.update=`${l} ? {fields: ${o}, values: [${a.join(", ")}]} : null`),delete s.value,delete s.on,n}},Q1="_toggle",GO={defined:e=>e.type==="point"&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+Q1,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+oa,i=t.name+Q1;return`${i} ? null : ${n}, `+(t.resolve==="global"?`${i} ? null : true, `:`${i} ? null : {unit: ${vl(e)}}, `)+`${i} ? ${n} : null`}},$ge={defined:e=>e.clear!==void 0&&e.clear!==!1,parse:(e,t)=>{t.clear&&(t.clear=te(t.clear)?Uo(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(HO.defined(t))for(const i of t.project.items){const r=n.findIndex(s=>s.name===_t(`${t.name}_${i.field}`));r!==-1&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,s){r!==-1&&n[r].on&&n[r].on.push({events:t.clear,update:s})}if(t.type==="interval")for(const r of t.project.items){const s=n.findIndex(o=>o.name===r.signals.visual);if(i(s,"[0, 0]"),s===-1){const o=n.findIndex(a=>a.name===r.signals.data);i(o,"null")}}else{let r=n.findIndex(s=>s.name===t.name+oa);i(r,"null"),GO.defined(t)&&(r=n.findIndex(s=>s.name===t.name+Q1),i(r,"false"))}return n}},VO={defined:e=>{const t=e.resolve==="global"&&e.bind&&H_(e.bind),n=e.project.items.length===1&&e.project.items[0].field!==kr;return t&&!n&&Y(efe),t&&n},parse:(e,t,n)=>{const i=Ce(n);if(i.select=te(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},tR(t,i),ie(n.select)&&(n.select.on||n.select.clear)){const o='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=ee(a.filter??[]),a.filter.includes(o)||a.filter.push(o)}const r=G_(t.bind)?t.bind.legend:"click",s=te(r)?Uo(r,"view"):ee(r);t.bind={legend:{merge:s}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=G_(t.bind)&&t.bind.legend,s=o=>a=>{const l=Ce(a);return l.markname=o,l};for(const o of t.project.items){if(!o.hasLegend)continue;const a=`${_t(o.field)}_legend`,l=`${i}_${a}`;if(n.filter(c=>c.name===l).length===0){const c=r.merge.map(s(`${a}_symbols`)).concat(r.merge.map(s(`${a}_labels`))).concat(r.merge.map(s(`${a}_entries`)));n.unshift({name:l,...t.init?{}:{value:null},on:[{events:c,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${l}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.find(d=>d.name===i+oa),o=i+Zd,a=r.items.filter(d=>d.hasLegend).map(d=>_t(`${i}_${_t(d.field)}_legend`)),u=`${a.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${o}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?s.on.push({events:a.map(d=>({signal:d})),update:u}):a.length>0&&(s.update=u,delete s.value,delete s.on);const c=n.find(d=>d.name===i+Q1),f=G_(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:f}):c.on[0].events=f),n}};function Ege(e,t,n){var r;const i=(r=e.fieldDef(t))==null?void 0:r.field;for(const s of ln(e.component.selection??{})){const o=s.project.hasField[i]??s.project.hasChannel[t];if(o&&VO.defined(s)){const a=n.get("selections")??[];a.push(s.name),n.set("selections",a,!1),o.hasLegend=!0}}}const XO="_translate_anchor",YO="_translate_delta",Cge={defined:e=>e.type==="interval"&&e.translate,signals:(e,t,n)=>{const i=t.name,r=Ks.defined(t),s=i+XO,{x:o,y:a}=t.project.hasChannel;let l=Uo(t.translate,"scope");return r||(l=l.map(u=>(u.between[0].markname=i+fc,u))),n.push({name:s,value:{},on:[{events:l.map(u=>u.between[0]),update:"{x: x(unit), y: y(unit)"+(o!==void 0?`, extent_x: ${r?aw(e,wt):`slice(${o.signals.visual})`}`:"")+(a!==void 0?`, extent_y: ${r?aw(e,Zt):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+YO,value:{},on:[{events:l,update:`{x: ${s}.x - x(unit), y: ${s}.y - y(unit)}`}]}),o!==void 0&&ZO(e,t,o,"width",n),a!==void 0&&ZO(e,t,a,"height",n),n}};function ZO(e,t,n,i,r){const s=t.name,o=s+XO,a=s+YO,l=n.channel,u=Ks.defined(t),c=r.filter(_=>_.name===n.signals[u?"data":"visual"])[0],f=e.getSizeSignalRef(i).signal,d=e.getScaleComponent(l),h=d&&d.get("type"),p=d&&d.get("reverse"),g=u?l===wt?p?"":"-":p?"-":"":"",m=`${o}.extent_${l}`,y=`${g}${a}.${l} / ${u?`${f}`:`span(${m})`}`,b=!u||!d?"panLinear":h==="log"?"panLog":h==="symlog"?"panSymlog":h==="pow"?"panPow":"panLinear",v=u?h==="pow"?`, ${d.get("exponent")??1}`:h==="symlog"?`, ${d.get("constant")??1}`:"":"",x=`${b}(${m}, ${y}${v})`;c.on.push({events:{signal:a},update:u?x:`clampRange(${x}, 0, ${f})`})}const KO="_zoom_anchor",JO="_zoom_delta",Sge={defined:e=>e.type==="interval"&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=Ks.defined(t),s=i+JO,{x:o,y:a}=t.project.hasChannel,l=J(e.scaleName(wt)),u=J(e.scaleName(Zt));let c=Uo(t.zoom,"scope");return r||(c=c.map(f=>(f.markname=i+fc,f))),n.push({name:i+KO,on:[{events:c,update:r?"{"+[l?`x: invert(${l}, x(unit))`:"",u?`y: invert(${u}, y(unit))`:""].filter(f=>f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:s,on:[{events:c,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),o!==void 0&&QO(e,t,o,"width",n),a!==void 0&&QO(e,t,a,"height",n),n}};function QO(e,t,n,i,r){const s=t.name,o=n.channel,a=Ks.defined(t),l=r.filter(b=>b.name===n.signals[a?"data":"visual"])[0],u=e.getSizeSignalRef(i).signal,c=e.getScaleComponent(o),f=c&&c.get("type"),d=a?aw(e,o):l.name,h=s+JO,p=`${s}${KO}.${o}`,g=!a||!c?"zoomLinear":f==="log"?"zoomLog":f==="symlog"?"zoomSymlog":f==="pow"?"zoomPow":"zoomLinear",m=a?f==="pow"?`, ${c.get("exponent")??1}`:f==="symlog"?`, ${c.get("constant")??1}`:"":"",y=`${g}(${d}, ${p}, ${h}${m})`;l.on.push({events:{signal:h},update:a?y:`clampRange(${y}, 0, ${u})`})}const bl="_store",oa="_tuple",Age="_modify",eR="vlSelectionResolve",em=[age,sge,ige,GO,HO,Ks,VO,$ge,Cge,Sge,WO];function Tge(e){let t=e.parent;for(;t&&!Cr(t);)t=t.parent;return t}function vl(e,{escape:t}={escape:!0}){let n=t?J(e.name):e.name;const i=Tge(e);if(i){const{facet:r}=i;for(const s of Wi)r[s]&&(n+=` + '__facet_${s}_' + (facet[${J(i.vgField(s))}])`)}return n}function dw(e){return ln(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function tR(e,t){(te(t.select)||!t.select.on)&&delete e.events,(te(t.select)||!t.select.clear)&&delete e.clear,(te(t.select)||!t.select.toggle)&&delete e.toggle}function hw(e){const t=[];return e.type==="Identifier"?[e.name]:e.type==="Literal"?[e.value]:(e.type==="MemberExpression"&&(t.push(...hw(e.object)),t.push(...hw(e.property))),t)}function nR(e){return e.object.type==="MemberExpression"?nR(e.object):e.object.name==="datum"}function iR(e){const t=Hx(e),n=new Set;return t.visit(i=>{i.type==="MemberExpression"&&nR(i)&&n.add(hw(i).slice(1).join("."))}),n}class pc extends ot{clone(){return new pc(null,this.model,Ce(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=tm(this.model,this.filter,this),this._dependentFields=iR(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function Mge(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;for(const r of t){const s=_t(r.name),o=r.select,a=te(o)?o:o.type,l=ie(o)?Ce(o):{type:a},u=i[a];for(const d in u)d==="fields"||d==="encodings"||(d==="mark"&&(l[d]={...u[d],...l[d]}),(l[d]===void 0||l[d]===!0)&&(l[d]=Ce(u[d]??l[d])));const c=n[s]={...l,name:s,type:a,init:r.value,bind:r.bind,events:te(l.on)?Uo(l.on,"scope"):ee(Ce(l.on))},f=Ce(r);for(const d of em)d.defined(c)&&d.parse&&d.parse(e,c,f)}return n}function rR(e,t,n,i="datum"){const r=te(t)?t:t.param,s=_t(r),o=J(s+bl);let a;try{a=e.getSelectionComponent(s,r)}catch{return`!!${s}`}if(a.project.timeUnit){const d=n??e.component.data.raw,h=a.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const l=a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",u=a.resolve==="global"?")":`, ${J(a.resolve)})`,c=`${l}${o}, ${i}${u}`,f=`length(data(${o}))`;return t.empty===!1?`${f} && ${c}`:`!${f} || ${c}`}function sR(e,t,n){const i=_t(t),r=n.encoding;let s=n.field,o;try{o=e.getSelectionComponent(i,t)}catch{return i}if(!r&&!s)s=o.project.items[0].field,o.project.items.length>1&&Y(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${J(s)}.`);else if(r&&!s){const a=o.project.items.filter(l=>l.channel===r);!a.length||a.length>1?(s=o.project.items[0].field,Y((a.length?"Multiple ":"No ")+`matching ${J(r)} encoding found for selection ${J(n.param)}. Using "field": ${J(s)}.`)):s=a[0].field}return`${o.name}[${J(ji(s))}]`}function Fge(e,t){for(const[n,i]of Wo(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new qn(new pc(t,e,{param:n}),r,yt.Lookup,e.component.data.outputNodeRefCounts)}}function tm(e,t,n){return Od(t,i=>te(i)?i:pde(i)?rR(e,i,n):UD(i))}function Dge(e,t){if(e)return q(e)&&!Jo(e)?e.map(n=>R_(n,t)).join(", "):e}function pw(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function Jd(e,t,n,i={header:!1}){var f,d;const{disable:r,orient:s,scale:o,labelExpr:a,title:l,zindex:u,...c}=e.combine();if(!r){for(const h in c){const p=ghe[h],g=c[h];if(p&&p!==t&&p!=="both")delete c[h];else if(Xd(g)){const{condition:m,...y}=g,b=ee(m),v=$N[h];if(v){const{vgProp:x,part:_}=v,k=[...b.map(w=>{const{test:$,...S}=w;return{test:tm(null,$),...S}}),y];pw(c,_,x,k),delete c[h]}else if(v===null){const x={signal:b.map(_=>{const{test:k,...w}=_;return`${tm(null,k)} ? ${uD(w)} : `}).join("")+uD(y)};c[h]=x}}else if(de(g)){const m=$N[h];if(m){const{vgProp:y,part:b}=m;pw(c,b,y,g),delete c[h]}}Pe(["labelAlign","labelBaseline"],h)&&c[h]===null&&delete c[h]}if(t==="grid"){if(!c.grid)return;if(c.encode){const{grid:h}=c.encode;c.encode={...h?{grid:h}:{}},lt(c.encode)&&delete c.encode}return{scale:o,orient:s,...c,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Dt(u,0)}}else{if(!i.header&&e.mainExtracted)return;if(a!==void 0){let p=a;(d=(f=c.encode)==null?void 0:f.labels)!=null&&d.update&&de(c.encode.labels.update.text)&&(p=il(a,"datum.label",c.encode.labels.update.text.signal)),pw(c,"labels","text",{signal:p})}if(c.labelAlign===null&&delete c.labelAlign,c.encode){for(const p of EN)e.hasAxisPart(p)||delete c.encode[p];lt(c.encode)&&delete c.encode}const h=Dge(l,n);return{scale:o,orient:s,grid:!1,...h?{title:h}:{},...c,...n.aria===!1?{aria:!1}:{},zindex:Dt(u,0)}}}}function oR(e){const{axes:t}=e.component,n=[];for(const i of as)if(t[i]){for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const s=i==="x"?"height":"width",o=e.getSizeSignalRef(s).signal;s!==o&&n.push({name:s,update:o})}}return n}function Nge(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>Jd(r,"grid",t)),...i.map(r=>Jd(r,"grid",t)),...n.map(r=>Jd(r,"main",t)),...i.map(r=>Jd(r,"main",t))].filter(r=>r)}function aR(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if(r==="axisOrient"){const s=n==="x"?"bottom":"left",o=t[n==="x"?"axisBottom":"axisLeft"]||{},a=t[n==="x"?"axisTop":"axisRight"]||{},l=new Set([...G(o),...G(a)]),u={};for(const c of l.values())u[c]={signal:`${i.signal} === "${s}" ? ${vr(o[c])} : ${vr(a[c])}`};return u}return t[r]})])}function Oge(e,t,n,i){const r=t==="band"?["axisDiscrete","axisBand"]:t==="point"?["axisDiscrete","axisPoint"]:VD(t)?["axisQuantitative"]:t==="time"||t==="utc"?["axisTemporal"]:[],s=e==="x"?"axisX":"axisY",o=de(n)?"axisOrient":`axis${Rd(n)}`,a=[...r,...r.map(u=>s+u.substr(4))],l=["axis",o,s];return{vlOnlyAxisConfig:aR(a,i,e,n),vgAxisConfig:aR(l,i,e,n),axisConfigStyle:Rge([...l,...a],i)}}function Rge(e,t){var i;const n=[{}];for(const r of e){let s=(i=t[r])==null?void 0:i.style;if(s){s=ee(s);for(const o of s)n.push(t.style[o])}}return Object.assign.apply(null,n)}function gw(e,t,n,i={}){var s;const r=fD(e,n,t);if(r!==void 0)return{configFrom:"style",configValue:r};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((s=i[o])==null?void 0:s[e])!==void 0)return{configFrom:o,configValue:i[o][e]};return{}}const lR={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??Lge(n,e),gridScale:({model:e,channel:t})=>Ige(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||cR(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||uR(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??Pge(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??Bge(t.type,n,Z(t)&&!!t.timeUnit,Z(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const s=e==="x"?"width":e==="y"?"height":void 0,o=s?t.getSizeSignalRef(s):void 0;return n.tickCount??Uge({fieldOrDatumDef:i,scaleType:r,size:o,values:n.values})},tickMinStep:qge,title:({axis:e,model:t,channel:n})=>{if(e.title!==void 0)return e.title;const i=fR(t,n);if(i!==void 0)return i;const r=t.typedFieldDef(n),s=n==="x"?"x2":"y2",o=t.fieldDef(s);return hD(r?[dN(r)]:[],Z(o)?[dN(o)]:[])},values:({axis:e,fieldOrDatumDef:t})=>Wge(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??Hge(n,t)};function Lge(e,t){return!Jt(e)&&Z(t)&&!mt(t==null?void 0:t.bin)&&!un(t==null?void 0:t.bin)}function Ige(e,t){const n=t==="x"?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function zge(e,t,n,i,r){const s=t==null?void 0:t.labelAngle;if(s!==void 0)return de(s)?s:Ld(s);{const{configValue:o}=gw("labelAngle",i,t==null?void 0:t.style,r);return o!==void 0?Ld(o):n===wt&&Pe([__,x_],e.type)&&!(Z(e)&&e.timeUnit)?270:void 0}}function mw(e){return`(((${e.signal} % 360) + 360) % 360)`}function uR(e,t,n,i){if(e!==void 0)if(n==="x"){if(de(e)){const r=mw(e),s=de(t)?`(${t.signal} === "top")`:t==="top";return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${s} ? "bottom" : "top"`}}if(45<e&&e<135||225<e&&e<315)return"middle";if(de(t)){const r=e<=45||315<=e?"===":"!==";return{signal:`${t.signal} ${r} "top" ? "bottom" : "top"`}}return(e<=45||315<=e)==(t==="top")?"bottom":"top"}else{if(de(e)){const r=mw(e),s=de(t)?`(${t.signal} === "left")`:t==="left";return{signal:`${r} <= 45 || 315 <= ${r} || (135 <= ${r} && ${r} <= 225) ? ${i?'"middle"':"null"} : (45 <= ${r} && ${r} <= 135) === ${s} ? "top" : "bottom"`}}if(e<=45||315<=e||135<=e&&e<=225)return i?"middle":null;if(de(t)){const r=45<=e&&e<=135?"===":"!==";return{signal:`${t.signal} ${r} "left" ? "top" : "bottom"`}}return(45<=e&&e<=135)==(t==="left")?"top":"bottom"}}function cR(e,t,n){if(e===void 0)return;const i=n==="x",r=i?0:90,s=i?"bottom":"left";if(de(e)){const o=mw(e),a=de(t)?`(${t.signal} === "${s}")`:t===s;return{signal:`(${r?`(${o} + 90)`:o} % 180 === 0) ? ${i?null:'"center"'} :(${r} < ${o} && ${o} < ${180+r}) === ${a} ? "left" : "right"`}}if((e+r)%180===0)return i?null:"center";if(de(t)){const o=r<e&&e<180+r?"===":"!==";return{signal:`${`${t.signal} ${o} "${s}"`} ? "left" : "right"`}}return(r<e&&e<180+r)==(t===s)?"left":"right"}function Pge(e,t){if(t==="x"&&Pe(["quantitative","temporal"],e))return!0}function Bge(e,t,n,i){if(n&&!ie(i)||e!=="nominal"&&e!=="ordinal")return t==="log"||t==="symlog"?"greedy":!0}function jge(e){return e==="x"?"bottom":"left"}function Uge({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){var r;if(!i&&!Jt(t)&&t!=="log"){if(Z(e)){if(mt(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&Pe(["month","hours","day","quarter"],(r=Kt(e.timeUnit))==null?void 0:r.unit))return}return{signal:`ceil(${n.signal}/40)`}}}function qge({format:e,fieldOrDatumDef:t}){if(e==="d")return 1;if(Z(t)){const{timeUnit:n}=t;if(n){const i=PD(n);if(i)return{signal:i}}}}function fR(e,t){const n=t==="x"?"x2":"y2",i=e.fieldDef(t),r=e.fieldDef(n),s=i?i.title:void 0,o=r?r.title:void 0;if(s&&o)return pD(s,o);if(s)return s;if(o)return o;if(s!==void 0)return s;if(o!==void 0)return o}function Wge(e,t){const n=e.values;if(q(n))return kN(t,n);if(de(n))return n}function Hge(e,t){return e==="rect"&&O1(t)?1:0}class gc extends ot{clone(){return new gc(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this._dependentFields=iR(this.transform.calculate)}static parseAllForSortIndex(t,n){return n.forEachFieldDef((i,r)=>{if(gl(i)&&fN(i.sort)){const{field:s,timeUnit:o}=i,a=i.sort,l=a.map((u,c)=>`${UD({field:s,timeUnit:o,equal:u})} ? ${c} : `).join("")+a.length;t=new gc(t,{calculate:l,as:mc(i,r,{forAs:!0})})}}),t}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${ze(this.transform)}`}}function mc(e,t,n){return Q(e,{prefix:t,suffix:"sort_index",...n??{}})}function nm(e,t){return Pe(["top","bottom"],t)?"column":Pe(["left","right"],t)||e==="row"?"row":"column"}function yc(e,t,n,i){const r=i==="row"?n.headerRow:i==="column"?n.headerColumn:n.headerFacet;return Dt((t||{})[e],r[e],n.header[e])}function im(e,t,n,i){const r={};for(const s of e){const o=yc(s,t||{},n,i);o!==void 0&&(r[s]=o)}return r}const yw=["row","column"],bw=["header","footer"];function Gge(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:s,titleAngle:o,titleOrient:a}=im(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),l=nm(t,a),u=Ld(o);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:n,...t==="row"?{orient:"left"}:{},style:"guide-title",...hR(u,l),...dR(l,u,s),...pR(i,r,t,Lhe,WN)}}}function dR(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=cR(t,e==="row"?"left":"top",e==="row"?"y":"x");return i?{align:i}:{}}function hR(e,t){const n=uR(e,t==="row"?"left":"top",t==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Vge(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of bw)if(n[r])for(const s of n[r]){const o=Yge(e,t,r,n,s);o!=null&&i.push(o)}return i}function Xge(e,t){const{sort:n}=e;return cs(n)?{field:Q(n,{expr:"datum"}),order:n.order??"ascending"}:q(n)?{field:mc(e,t,{expr:"datum"}),order:"ascending"}:{field:Q(e,{expr:"datum"}),order:n??"ascending"}}function vw(e,t,n){const{format:i,formatType:r,labelAngle:s,labelAnchor:o,labelOrient:a,labelExpr:l}=im(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),u=M_({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,c=nm(t,a);return{text:{signal:l?il(il(l,"datum.label",u),"datum.value",Q(e,{expr:"parent"})):u},...t==="row"?{orient:"left"}:{},style:"guide-label",frame:"group",...hR(s,c),...dR(c,s,o),...pR(n,e,t,Ihe,HN)}}function Yge(e,t,n,i,r){if(r){let s=null;const{facetFieldDef:o}=i,a=e.config?e.config:void 0;if(o&&r.labels){const{labelOrient:f}=im(["labelOrient"],o.header,a,t);(t==="row"&&!Pe(["top","bottom"],f)||t==="column"&&!Pe(["left","right"],f))&&(s=vw(o,t,a))}const l=Cr(e)&&!Hd(e.facet),u=r.axes,c=(u==null?void 0:u.length)>0;if(s||c){const f=t==="row"?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Xge(o,t)}:{},...c&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...s?{title:s}:{},...r.sizeSignal?{encode:{update:{[f]:r.sizeSignal}}}:{},...c?{axes:u}:{}}}}return null}const Zge={column:{start:0,end:1},row:{start:1,end:0}};function Kge(e,t){return Zge[t][e]}function Jge(e,t){const n={};for(const i of Wi){const r=e[i];if(r!=null&&r.facetFieldDef){const{titleAnchor:s,titleOrient:o}=im(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=nm(i,o),l=Kge(s,a);l!==void 0&&(n[a]=l)}}return lt(n)?void 0:n}function pR(e,t,n,i,r){const s={};for(const o of i){if(!r[o])continue;const a=yc(o,t==null?void 0:t.header,e,n);a!==void 0&&(s[r[o]]=a)}return s}function xw(e){return[...rm(e,"width"),...rm(e,"height"),...rm(e,"childWidth"),...rm(e,"childHeight")]}function rm(e,t){const n=t==="width"?"x":"y",i=e.component.layoutSize.get(t);if(!i||i==="merged")return[];const r=e.getSizeSignalRef(t).signal;if(i==="step"){const s=e.getScaleComponent(n);if(s){const o=s.get("type"),a=s.get("range");if(Jt(o)&&Qo(a)){const l=e.scaleName(n);return Cr(e.parent)&&e.parent.component.resolve.scale[n]==="independent"?[gR(l,a)]:[gR(l,a),{name:r,update:mR(l,s,`domain('${l}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(i=="container"){const s=r.endsWith("width"),o=s?"containerSize()[0]":"containerSize()[1]",a=Z_(e.config.view,s?"width":"height"),l=`isFinite(${o}) ? ${o} : ${a}`;return[{name:r,init:l,on:[{update:l,events:"window:resize"}]}]}else return[{name:r,value:i}]}function gR(e,t){const n=`${e}_step`;return de(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function mR(e,t,n){const i=t.get("type"),r=t.get("padding"),s=Dt(t.get("paddingOuter"),r);let o=t.get("paddingInner");return o=i==="band"?o!==void 0?o:r:1,`bandspace(${n}, ${vr(o)}, ${vr(s)}) * ${e}_step`}function yR(e){return e==="childWidth"?"width":e==="childHeight"?"height":e}function bR(e,t){return G(e).reduce((n,i)=>{const r=e[i];return{...n,...dc(t,r,i,s=>vt(s.value))}},{})}function vR(e,t){if(Cr(t))return e==="theta"?"independent":"shared";if(xc(t))return"shared";if(Rw(t))return Nt(e)||e==="theta"||e==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function _w(e,t){const n=e.scale[t],i=Nt(t)?"axis":"legend";return n==="independent"?(e[i][t]==="shared"&&Y(Lfe(t)),"independent"):e[i][t]||"shared"}const Qge={...Phe,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},xR=G(Qge);class e0e extends Zs{}const _R={symbols:t0e,gradient:n0e,labels:i0e,entries:r0e};function t0e(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:s}){if(s!=="symbol")return;const{markDef:o,encoding:a,config:l,mark:u}=n,c=o.filled&&u!=="trail";let f={...Xce({},n,Pde),...IO(n,{filled:c})};const d=r.get("symbolOpacity")??l.legend.symbolOpacity,h=r.get("symbolFillColor")??l.legend.symbolFillColor,p=r.get("symbolStrokeColor")??l.legend.symbolStrokeColor,g=d===void 0?wR(a.opacity)??o.opacity:void 0;if(f.fill){if(i==="fill"||c&&i===si)delete f.fill;else if(f.fill.field)h?delete f.fill:(f.fill=vt(l.legend.symbolBaseFillColor??"black"),f.fillOpacity=vt(g??1));else if(q(f.fill)){const m=ww(a.fill??a.color)??o.fill??(c&&o.color);m&&(f.fill=vt(m))}}if(f.stroke){if(i==="stroke"||!c&&i===si)delete f.stroke;else if(f.stroke.field||p)delete f.stroke;else if(q(f.stroke)){const m=Dt(ww(a.stroke||a.color),o.stroke,c?o.color:void 0);m&&(f.stroke={value:m})}}if(i!==qs){const m=Z(t)&&$R(n,r,t);m?f.opacity=[{test:m,...vt(g??1)},vt(l.legend.unselectedOpacity)]:g&&(f.opacity=vt(g))}return f={...f,...e},lt(f)?void 0:f}function n0e(e,{model:t,legendType:n,legendCmpt:i}){if(n!=="gradient")return;const{config:r,markDef:s,encoding:o}=t;let a={};const u=(i.get("gradientOpacity")??r.legend.gradientOpacity)===void 0?wR(o.opacity)||s.opacity:void 0;return u&&(a.opacity=vt(u)),a={...a,...e},lt(a)?void 0:a}function i0e(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const s=n.legend(i)||{},o=n.config,a=Z(t)?$R(n,r,t):void 0,l=a?[{test:a,value:1},{value:o.legend.unselectedOpacity}]:void 0,{format:u,formatType:c}=s;let f;pl(c)?f=_r({fieldOrDatumDef:t,field:"datum.value",format:u,formatType:c,config:o}):u===void 0&&c===void 0&&o.customFormatTypes&&(t.type==="quantitative"&&o.numberFormatType?f=_r({fieldOrDatumDef:t,field:"datum.value",format:o.numberFormat,formatType:o.numberFormatType,config:o}):t.type==="temporal"&&o.timeFormatType&&Z(t)&&t.timeUnit===void 0&&(f=_r({fieldOrDatumDef:t,field:"datum.value",format:o.timeFormat,formatType:o.timeFormatType,config:o})));const d={...l?{opacity:l}:{},...f?{text:f}:{},...e};return lt(d)?void 0:d}function r0e(e,{legendCmpt:t}){const n=t.get("selections");return n!=null&&n.length?{...e,fill:{value:"transparent"}}:e}function wR(e){return kR(e,(t,n)=>Math.max(t,n.value))}function ww(e){return kR(e,(t,n)=>Dt(t,n.value))}function kR(e,t){if(ihe(e))return ee(e.condition).reduce(t,e.value);if(wr(e))return e.value}function $R(e,t,n){const i=t.get("selections");if(!(i!=null&&i.length))return;const r=J(n.field);return i.map(s=>`(!length(data(${J(_t(s)+bl)})) || (${s}[${r}] && indexof(${s}[${r}], datum.value) >= 0))`).join(" || ")}const ER={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return sN(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return oN(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??f0e(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??d0e(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??o0e(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>oc(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(Qu(n)&&xr(t)){if(e==="gradient")return}else if(e==="symbol")return;return e},values:({fieldOrDatumDef:e,legend:t})=>s0e(t,e)};function s0e(e,t){const n=e.values;if(q(n))return kN(t,n);if(de(n))return n}function o0e(e,t,n,i){if(t!=="shape"){const r=ww(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function a0e(e){const{legend:t}=e;return Dt(t.type,l0e(e))}function l0e({channel:e,timeUnit:t,scaleType:n}){if(Qu(e)){if(Pe(["quarter","month","day"],t))return"symbol";if(xr(n))return"gradient"}return"symbol"}function u0e({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??c0e(n,t)}function c0e(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return t==="gradient"?"horizontal":void 0}}function f0e({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:s,gradientHorizontalMinLength:o,gradientVerticalMaxLength:a,gradientVerticalMinLength:l}=e;if(xr(r))return n==="horizontal"?i==="top"||i==="bottom"?CR(t,"width",o,s):o:CR(t,"height",l,a)}function CR(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function d0e(e){if(Pe(["quantile","threshold","log","symlog"],e))return"greedy"}function SR(e){const t=At(e)?h0e(e):y0e(e);return e.component.legends=t,t}function h0e(e){const{encoding:t}=e,n={};for(const i of[si,...VN]){const r=Ut(t[i]);!r||!e.getScaleComponent(i)||i===oi&&Z(r)&&r.type===nc||(n[i]=m0e(e,i))}return n}function p0e(e,t){const n=e.scaleName(t);if(e.mark==="trail"){if(t==="color")return{stroke:n};if(t==="size")return{strokeWidth:n}}return t==="color"?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}function g0e(e,t,n,i){switch(t){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(t==="title"&&e===(i==null?void 0:i.title))return!0}return e===(n||{})[t]}function m0e(e,t){var x;let n=e.legend(t);const{markDef:i,encoding:r,config:s}=e,o=s.legend,a=new e0e({},p0e(e,t));Ege(e,t,a);const l=n!==void 0?!n:o.disable;if(a.set("disable",l,n!==void 0),l)return a;n=n||{};const u=e.getScaleComponent(t).get("type"),c=Ut(r[t]),f=Z(c)?(x=Kt(c.timeUnit))==null?void 0:x.unit:void 0,d=n.orient||s.legend.orient||"right",h=a0e({legend:n,channel:t,timeUnit:f,scaleType:u}),p=u0e({legend:n,legendType:h,orient:d,legendConfig:o}),g={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:c,legendConfig:o,config:s,scaleType:u,orient:d,legendType:h,direction:p};for(const _ of xR){if(h==="gradient"&&_.startsWith("symbol")||h==="symbol"&&_.startsWith("gradient"))continue;const k=_ in ER?ER[_](g):n[_];if(k!==void 0){const w=g0e(k,_,n,e.fieldDef(t));(w||s.legend[_]===void 0)&&a.set(_,k,w)}}const m=(n==null?void 0:n.encoding)??{},y=a.get("selections"),b={},v={fieldOrDatumDef:c,model:e,channel:t,legendCmpt:a,legendType:h};for(const _ of["labels","legend","title","symbols","gradient","entries"]){const k=bR(m[_]??{},e),w=_ in _R?_R[_](k,v):k;w!==void 0&&!lt(w)&&(b[_]={...y!=null&&y.length&&Z(c)?{name:`${_t(c.field)}_legend_${_}`}:{},...y!=null&&y.length?{interactive:!!y}:{},update:w})}return lt(b)||a.set("encode",b,!!(n!=null&&n.encoding)),a}function y0e(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){SR(i);for(const r of G(i.component.legends))n.legend[r]=_w(e.component.resolve,r),n.legend[r]==="shared"&&(t[r]=AR(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of G(t))for(const r of e.children)r.component.legends[i]&&n.legend[i]==="shared"&&delete r.component.legends[i];return t}function AR(e,t){var s,o,a,l;if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const u of xR){const c=ia(e.getWithExplicit(u),t.getWithExplicit(u),u,"legend",(f,d)=>{switch(u){case"symbolType":return b0e(f,d);case"title":return gD(f,d);case"type":return r=!0,Ci("symbol")}return V1(f,d,u,"legend")});e.setWithExplicit(u,c)}return r&&((o=(s=e.implicit)==null?void 0:s.encode)!=null&&o.gradient&&u1(e.implicit,["encode","gradient"]),(l=(a=e.explicit)==null?void 0:a.encode)!=null&&l.gradient&&u1(e.explicit,["encode","gradient"])),e}function b0e(e,t){return t.value==="circle"?t:e}function v0e(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function TR(e){const t=e.component.legends,n={};for(const r of G(t)){const s=e.getScaleComponent(r),o=ut(s.get("domains"));if(n[o])for(const a of n[o])AR(a,t[r])||n[o].push(t[r]);else n[o]=[t[r].clone()]}return ln(n).flat().map(r=>x0e(r,e.config)).filter(r=>r!==void 0)}function x0e(e,t){var o,a,l;const{disable:n,labelExpr:i,selections:r,...s}=e.combine();if(!n){if(t.aria===!1&&s.aria==null&&(s.aria=!1),(o=s.encode)!=null&&o.symbols){const u=s.encode.symbols.update;u.fill&&u.fill.value!=="transparent"&&!u.stroke&&!s.stroke&&(u.stroke={value:"transparent"});for(const c of VN)s[c]&&delete u[c]}if(s.title||delete s.title,i!==void 0){let u=i;(l=(a=s.encode)==null?void 0:a.labels)!=null&&l.update&&de(s.encode.labels.update.text)&&(u=il(i,"datum.label",s.encode.labels.update.text.signal)),v0e(s,"labels","text",{signal:u})}return s}}function _0e(e){return xc(e)||Rw(e)?w0e(e):MR(e)}function w0e(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),MR(e))}function MR(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(o=>o.signal).join(", ")}]`},s=t.data.reduce((o,a)=>{const l=de(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return Pe(o,l)||o.push(l),o},[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]},...n}]}else return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const k0e=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class FR extends Zs{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function DR(e){e.component.projection=At(e)?$0e(e):S0e(e)}function $0e(e){if(e.hasProjection){const t=li(e.specifiedProjection),n=!(t&&(t.scale!=null||t.translate!=null)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?E0e(e):void 0,s=new FR(e.projectionName(!0),{...li(e.config.projection)??{},...t??{}},i,r);return s.get("type")||s.set("type","equalEarth",!1),s}}function E0e(e){const t=[],{encoding:n}=e;for(const i of[[yr,mr],[qi,br]])(Ut(n[i[0]])||Ut(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(oi)&&e.typedFieldDef(oi).type===nc&&t.push({signal:e.getName(`geojson_${t.length}`)}),t.length===0&&t.push(e.requestDataName(yt.Main)),t}function C0e(e,t){const n=q7(k0e,r=>!!(!pe(e.explicit,r)&&!pe(t.explicit,r)||pe(e.explicit,r)&&pe(t.explicit,r)&&ki(e.get(r),t.get(r))));if(ki(e.size,t.size)){if(n)return e;if(ki(e.explicit,{}))return t;if(ki(t.explicit,{}))return e}return null}function S0e(e){if(e.children.length===0)return;let t;for(const i of e.children)DR(i);const n=q7(e.children,i=>{const r=i.component.projection;if(r)if(t){const s=C0e(t,r);return s&&(t=s),!!s}else return t=r,!0;else return!0});if(t&&n){const i=e.projectionName(!0),r=new FR(i,t.specifiedProjection,t.size,Ce(t.data));for(const s of e.children){const o=s.component.projection;o&&(o.isFit&&r.data.push(...s.component.projection.data),s.renameProjection(o.get("name"),i),o.merged=!0)}return r}}function A0e(e,t,n,i){if(Vd(t,n)){const r=At(e)?e.axis(n)??e.legend(n)??{}:{},s=Q(t,{expr:"datum"}),o=Q(t,{expr:"datum",binSuffix:"end"});return{formulaAs:Q(t,{binSuffix:"range",forAs:!0}),formula:Wd(s,o,r.format,r.formatType,i)}}return{}}function NR(e,t){return`${rD(e)}_${t}`}function T0e(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}function kw(e,t,n){const i=I1(n,void 0)??{},r=NR(i,t);return e.getName(`${r}_bins`)}function M0e(e){return"as"in e}function OR(e,t,n){let i,r;M0e(e)?i=te(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:i=[Q(e,{forAs:!0}),Q(e,{binSuffix:"end",forAs:!0})];const s={...I1(t,void 0)},o=NR(s,e.field),{signal:a,extentSignal:l}=T0e(n,o);if(b1(s.extent)){const c=s.extent;r=sR(n,c.param,c),delete s.extent}const u={bin:s,field:e.field,as:[i],...a?{signal:a}:{},...l?{extentSignal:l}:{},...r?{span:r}:{}};return{key:o,binComponent:u}}class ms extends ot{clone(){return new ms(null,Ce(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s,o)=>{if(Un(s)&&mt(s.bin)){const{key:a,binComponent:l}=OR(s,s.bin,n);r[a]={...l,...r[a],...A0e(n,s,o,n.config)}}return r},{});return lt(i)?null:new ms(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:s}=OR(n,n.bin,i);return new ms(t,{[r]:s})}merge(t,n){for(const i of G(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=ns([...this.bins[i].as,...t.bins[i].as],ze)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(ln(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(ln(this.bins).map(t=>t.field))}hash(){return`Bin ${ze(this.bins)}`}assemble(){return ln(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:s,...o}=t.bin,a={type:"bin",field:ji(t.field),as:i,signal:t.signal,...b1(s)?{extent:null}:{extent:s},...t.span?{span:{signal:`span(${t.span})`}}:{},...o};!s&&t.extentSignal&&(n.push({type:"extent",field:ji(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const l of r)for(let u=0;u<2;u++)n.push({type:"formula",expr:Q({field:i[u]},{expr:"datum"}),as:l[u]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}function F0e(e,t,n,i){var s;const r=At(i)?i.encoding[os(t)]:void 0;if(Un(n)&&At(i)&&pN(n,r,i.markDef,i.config)){e.add(Q(n,{})),e.add(Q(n,{suffix:"end"}));const{mark:o,markDef:a,config:l}=i,u=ta({fieldDef:n,markDef:a,config:l});Ud(o)&&u!==.5&&Nt(t)&&(e.add(Q(n,{suffix:X1})),e.add(Q(n,{suffix:Y1}))),n.bin&&Vd(n,t)&&e.add(Q(n,{binSuffix:"range"}))}else if(XF(t)){const o=VF(t);e.add(i.getName(o))}else e.add(Q(n));return gl(n)&&Sde((s=n.scale)==null?void 0:s.range)&&e.add(n.scale.range.field),e}function D0e(e,t){for(const n of G(t)){const i=t[n];for(const r of G(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}class $r extends ot{clone(){return new $r(null,new Set(this.dimensions),Ce(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(o=>{o.aggregate&&(i=!0)});const r={},s=new Set;return!i||(n.forEachFieldDef((o,a)=>{const{aggregate:l,field:u}=o;if(l)if(l==="count")r["*"]??(r["*"]={}),r["*"].count=new Set([Q(o,{forAs:!0})]);else{if(Hs(l)||Ko(l)){const c=Hs(l)?"argmin":"argmax",f=l[c];r[f]??(r[f]={}),r[f][c]=new Set([Q({op:c,field:f},{forAs:!0})])}else r[u]??(r[u]={}),r[u][l]=new Set([Q(o,{forAs:!0})]);Ws(a)&&n.scaleDomain(a)==="unaggregated"&&(r[u]??(r[u]={}),r[u].min=new Set([Q({field:u,aggregate:"min"},{forAs:!0})]),r[u].max=new Set([Q({field:u,aggregate:"max"},{forAs:!0})]))}else F0e(s,a,o,n)}),s.size+G(r).length===0)?null:new $r(t,s,r)}static makeFromTransform(t,n){const i=new Set,r={};for(const s of n.aggregate){const{op:o,field:a,as:l}=s;o&&(o==="count"?(r["*"]??(r["*"]={}),r["*"].count=new Set([l||Q(s,{forAs:!0})])):(r[a]??(r[a]={}),r[a][o]=new Set([l||Q(s,{forAs:!0})])))}for(const s of n.groupby??[])i.add(s);return i.size+G(r).length===0?null:new $r(t,i,r)}merge(t){return zF(this.dimensions,t.dimensions)?(D0e(this.measures,t.measures),!0):(Jfe("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...G(this.measures)])}producedFields(){const t=new Set;for(const n of G(this.measures))for(const i of G(this.measures[n])){const r=this.measures[n][i];r.size===0?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${ze({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const s of G(this.measures))for(const o of G(this.measures[s]))for(const a of this.measures[s][o])i.push(a),t.push(o),n.push(s==="*"?null:ji(s));return{type:"aggregate",groupby:[...this.dimensions].map(ji),ops:t,fields:n,as:i}}}class bc extends ot{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const s of Wi){const o=n.facet[s];if(o){const{bin:a,sort:l}=o;this[s]={name:n.getName(`${s}_domain`),fields:[Q(o),...mt(a)?[Q(o,{binSuffix:"end"})]:[]],...cs(l)?{sortField:l}:q(l)?{sortIndexField:mc(o,s)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Wi)this[n]&&(t+=` ${n.charAt(0)}:${ze(this[n])}`);return t}get fields(){var n;const t=[];for(const i of Wi)(n=this[i])!=null&&n.fields&&t.push(...this[i].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Wi)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of as){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),s=i.get("range");if(Jt(r)&&Qo(s)){const o=om(this.childModel,n),a=Nw(o);a?t[n]=a:Y(o_(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],s=[],o=[],a=[];r&&i&&i[r]&&(n?(s.push(`distinct_${i[r]}`),o.push("max")):(s.push(i[r]),o.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:l,sortIndexField:u}=this[t];if(l){const{op:c=T1,field:f}=l;s.push(f),o.push(c),a.push(Q(l,{forAs:!0}))}else u&&(s.push(u),o.push("max"),a.push(u));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...s.length?{fields:s,ops:o,as:a}:{}}]}}assembleFacetHeaderData(t){var l;const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],s={};for(const u of yw){for(const c of bw){const f=(i[u]&&i[u][c])??[];for(const d of f)if(((l=d.axes)==null?void 0:l.length)>0){s[u]=!0;break}}if(s[u]){const c=`length(data("${this.facet.name}"))`,f=u==="row"?n?{signal:`ceil(${c} / ${n})`}:1:n?{signal:`min(${c}, ${n})`}:{signal:c};r.push({name:`${this.facet.name}_${u}`,transform:[{type:"sequence",start:0,stop:f}]})}}const{row:o,column:a}=s;return(o||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:s,facet:o}=this;if(r&&s&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),l=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:l}]})}for(const a of[Ps,zs])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(o){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function RR(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function N0e(e,t){const n=V7(e);if(t==="number")return`toNumber(${n})`;if(t==="boolean")return`toBoolean(${n})`;if(t==="string")return`toString(${n})`;if(t==="date")return`toDate(${n})`;if(t==="flatten")return n;if(t.startsWith("date:")){const i=RR(t.slice(5,t.length));return`timeParse(${n},'${i}')`}else if(t.startsWith("utc:")){const i=RR(t.slice(4,t.length));return`utcParse(${n},'${i}')`}else return Y(afe(t)),null}function O0e(e){const t={};return l1(e.filter,n=>{if(jD(n)){let i=null;d_(n)?i=$i(n.equal):p_(n)?i=$i(n.lte):h_(n)?i=$i(n.lt):g_(n)?i=$i(n.gt):m_(n)?i=$i(n.gte):y_(n)?i=n.range[0]:b_(n)&&(i=(n.oneOf??n.in)[0]),i&&(ll(i)?t[n.field]="date":Xe(i)?t[n.field]="number":te(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}function R0e(e){const t={};function n(i){lc(i)?t[i.field]="date":i.type==="quantitative"&&Bce(i.aggregate)?t[i.field]="number":Zu(i.field)>1?i.field in t||(t[i.field]="flatten"):gl(i)&&cs(i.sort)&&Zu(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((At(e)||Cr(e))&&e.forEachFieldDef((i,r)=>{if(Un(i))n(i);else{const s=ol(r),o=e.fieldDef(s);n({...i,type:o.type})}}),At(e)){const{mark:i,markDef:r,encoding:s}=e;if(ea(i)&&!e.encoding.order){const o=r.orient==="horizontal"?"y":"x",a=s[o];Z(a)&&a.type==="quantitative"&&!(a.field in t)&&(t[a.field]="number")}}return t}function L0e(e){const t={};if(At(e)&&e.component.selection)for(const n of G(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&Zu(r.field)>1&&(t[r.field]="flatten")}return t}class En extends ot{clone(){return new En(null,Ce(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${ze(this._parse)}`}static makeExplicit(t,n,i){var o;let r={};const s=n.data;return!ra(s)&&((o=s==null?void 0:s.format)!=null&&o.parse)&&(r=s.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of G(i)){const l=r.getWithExplicit(a);l.value!==void 0&&(l.explicit||l.value===i[a]||l.value==="derived"||i[a]==="flatten"?delete i[a]:Y(wD(a,i[a],l.value)))}for(const a of G(n)){const l=r.get(a);l!==void 0&&(l===n[a]?delete n[a]:Y(wD(a,n[a],l)))}const s=new Zs(n,i);r.copyAll(s);const o={};for(const a of G(s.combine())){const l=s.get(a);l!==null&&(o[a]=l)}return G(o).length===0||r.parseNothing?null:new En(t,o)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of G(this._parse)){const i=this._parse[n];Zu(n)===1&&(t[n]=i)}return t}producedFields(){return new Set(G(this._parse))}dependentFields(){return new Set(G(this._parse))}assembleTransforms(t=!1){return G(this._parse).filter(n=>t?Zu(n)>1:!0).map(n=>{const i=N0e(n,this._parse[n]);return i?{type:"formula",expr:i,as:X7(n)}:null}).filter(n=>n!==null)}}class aa extends ot{clone(){return new aa(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([kr])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:kr}}}class Qd extends ot{clone(){return new Qd(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${ze(this.params)}`}assemble(){return{type:"graticule",...this.params===!0?{}:this.params}}}class eh extends ot{clone(){return new eh(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${ze(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class xl extends ot{constructor(t){super(null),t??(t={name:"source"});let n;if(ra(t)||(n=t.format?{...ri(t.format,["parse"])}:{}),Yd(t))this._data={values:t.values};else if(cc(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];Pe(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else $O(t)?this._data={values:[{type:"Sphere"}]}:(wO(t)||ra(t))&&(this._data={});this._generator=ra(t),t.name&&(this._name=t.name),n&&!lt(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(t){this._name=t}set parent(t){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var LR=function(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n},I0e=function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},th;function $w(e){return e instanceof xl||e instanceof Qd||e instanceof eh}class Ew{constructor(){th.set(this,void 0),LR(this,th,!1,"f")}setModified(){LR(this,th,!0,"f")}get modifiedFlag(){return I0e(this,th,"f")}}th=new WeakMap;class _l extends Ew{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,s)=>s[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class Cw extends Ew{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class z0e extends Cw{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r<n.length;r++)i[n[r]]===void 0?i[n[r]]=[t.children[r]]:i[n[r]].push(t.children[r]);for(const r of G(i))i[r].length>1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class P0e extends Cw{constructor(t){super(),this.requiresSelectionId=t&&dw(t)}run(t){t instanceof aa&&(this.requiresSelectionId&&($w(t.parent)||t.parent instanceof $r||t.parent instanceof En)||(this.setModified(),t.remove()))}}class B0e extends Ew{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof gs&&(i=t.producedFields(),W7(i,n)&&(this.setModified(),t.removeFormulas(n),t.producedFields.length===0&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class j0e extends Cw{constructor(){super()}run(t){t instanceof qn&&!t.isRequired()&&(this.setModified(),t.remove())}}class U0e extends _l{run(t){if(!$w(t)&&!(t.numChildren()>1)){for(const n of t.children)if(n instanceof En)if(t instanceof En)this.setModified(),t.merge(n);else{if(G7(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class q0e extends _l{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof En);if(t.numChildren()>1&&i.length>=1){const r={},s=new Set;for(const o of i){const a=o.parse;for(const l of G(a))l in r?r[l]!==a[l]&&s.add(l):r[l]=a[l]}for(const o of s)delete r[o];if(!lt(r)){this.setModified();const o=new En(t,r);for(const a of n){if(a instanceof En)for(const l of G(r))delete a.parse[l];t.removeChild(a),a.parent=o,a instanceof En&&G(a.parse).length===0&&a.remove()}}}}}class W0e extends _l{run(t){t instanceof qn||t.numChildren()>0||t instanceof bc||t instanceof xl||(this.setModified(),t.remove())}}class H0e extends _l{run(t){const n=t.children.filter(r=>r instanceof gs),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class G0e extends _l{run(t){const n=t.children.filter(r=>r instanceof $r),i={};for(const r of n){const s=ze(r.groupBy);s in i||(i[s]=[]),i[s].push(r)}for(const r of G(i)){const s=i[r];if(s.length>1){const o=s.pop();for(const a of s)o.merge(a)&&(t.removeChild(a),a.parent=o,a.remove(),this.setModified())}}}}class V0e extends _l{constructor(t){super(),this.model=t}run(t){const n=!($w(t)||t instanceof pc||t instanceof En||t instanceof aa),i=[],r=[];for(const s of t.children)s instanceof ms&&(n&&!G7(t.producedFields(),s.dependentFields())?i.push(s):r.push(s));if(i.length>0){const s=i.pop();for(const o of i)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof ms?t.merge(s,this.model.renameSignal.bind(this.model)):s.swapWithParent()}if(r.length>1){const s=r.pop();for(const o of r)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified()}}}class X0e extends _l{run(t){const n=[...t.children];if(!nl(n,o=>o instanceof qn)||t.numChildren()<=1)return;const r=[];let s;for(const o of n)if(o instanceof qn){let a=o;for(;a.numChildren()===1;){const[l]=a.children;if(l instanceof qn)a=l;else break}r.push(...a.children),s?(t.removeChild(o),o.parent=s.parent,s.parent.removeChild(s),s.parent=a,this.setModified()):s=a}else r.push(o);if(r.length){this.setModified();for(const o of r)o.parent.removeChild(o),o.parent=s}}}class wl extends ot{clone(){return new wl(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ns(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??Q(t)}hash(){return`JoinAggregateTransform ${ze(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const s of this.transform.joinaggregate)n.push(s.op),i.push(this.getDefaultName(s)),t.push(s.field===void 0?null:s.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...r!==void 0?{groupby:r}:{}}}}function Y0e(e){return e.stack.stackBy.reduce((t,n)=>{const i=n.fieldDef,r=Q(i);return r&&t.push(r),t},[])}function Z0e(e){return q(e)&&e.every(t=>te(t))&&e.length>1}class Js extends ot{clone(){return new Js(null,Ce(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:s,offset:o="zero"}=n,a=[],l=[];if(n.sort!==void 0)for(const f of n.sort)a.push(f.field),l.push(Dt(f.order,"ascending"));const u={field:a,order:l};let c;return Z0e(s)?c=s:te(s)?c=[s,`${s}_end`]:c=[`${n.stack}_start`,`${n.stack}_end`],new Js(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:o,sort:u,facetby:[],as:c})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:s,fieldChannel:o,offset:a,impute:l}=i,u=s.map(h=>{const p=r[h];return ds(p)}).filter(h=>!!h),c=Y0e(n),f=n.encoding.order;let d;if(q(f)||Z(f))d=dD(f);else{const h=gN(f)?f.sort:o==="y"?"descending":"ascending";d=c.reduce((p,g)=>(p.field.push(g),p.order.push(h),p),{field:[],order:[]})}return new Js(t,{dimensionFieldDefs:u,stackField:n.vgField(o),facetby:[],stackby:c,sort:d,offset:a,impute:l,as:[n.vgField(o,{suffix:"start",forAs:!0}),n.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${ze(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[Q(r,{binSuffix:"mid"})]:[Q(r,{}),Q(r,{binSuffix:"end"})]:[Q(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:s,sort:o,offset:a,impute:l,as:u}=this._stack;if(l)for(const c of i){const{bandPosition:f=.5,bin:d}=c;if(d){const h=Q(c,{expr:"datum"}),p=Q(c,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${f}*${h}+${1-f}*${p}`,as:Q(c,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...s,...n],key:Q(c,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:o,as:u,offset:a}),t}}class vc extends ot{clone(){return new vc(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ns(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??Q(t)}hash(){return`WindowTransform ${ze(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const f of this.transform.window)n.push(f.op),i.push(this.getDefaultName(f)),r.push(f.param===void 0?null:f.param),t.push(f.field===void 0?null:f.field);const s=this.transform.frame,o=this.transform.groupby;if(s&&s[0]===null&&s[1]===null&&n.every(f=>i_(f)))return{type:"joinaggregate",as:i,ops:n,fields:t,...o!==void 0?{groupby:o}:{}};const a=[],l=[];if(this.transform.sort!==void 0)for(const f of this.transform.sort)a.push(f.field),l.push(f.order??"ascending");const u={field:a,order:l},c=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:u,...c!==void 0?{ignorePeers:c}:{},...o!==void 0?{groupby:o}:{},...s!==void 0?{frame:s}:{}}}}function K0e(e){function t(n){if(!(n instanceof bc)){const i=n.clone();if(i instanceof qn){const r=Aw+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof $r||i instanceof Js||i instanceof vc||i instanceof wl)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}return t}function Sw(e){if(e instanceof bc)if(e.numChildren()===1&&!(e.children[0]instanceof qn)){const t=e.children[0];(t instanceof $r||t instanceof Js||t instanceof vc||t instanceof wl)&&t.addDimensions(e.fields),t.swapWithParent(),Sw(e)}else{const t=e.model.component.data.main;IR(t);const n=K0e(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else e.children.map(Sw)}function IR(e){if(e instanceof qn&&e.type===yt.Main&&e.numChildren()===1){const t=e.children[0];t instanceof bc||(t.swapWithParent(),IR(e))}}const Aw="scale_",sm=5;function Tw(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!Tw(t.children))return!1}return!0}function Er(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function zR(e,t,n){let i=e.sources,r=!1;return r=Er(new j0e,i)||r,r=Er(new P0e(t),i)||r,i=i.filter(s=>s.numChildren()>0),r=Er(new W0e,i)||r,i=i.filter(s=>s.numChildren()>0),n||(r=Er(new U0e,i)||r,r=Er(new V0e(t),i)||r,r=Er(new B0e,i)||r,r=Er(new q0e,i)||r,r=Er(new G0e,i)||r,r=Er(new H0e,i)||r,r=Er(new z0e,i)||r,r=Er(new X0e,i)||r),e.sources=i,r}function J0e(e,t){Tw(e.sources);let n=0,i=0;for(let r=0;r<sm&&zR(e,t,!0);r++)n++;e.sources.map(Sw);for(let r=0;r<sm&&zR(e,t,!1);r++)i++;Tw(e.sources),Math.max(n,i)===sm&&Y(`Maximum optimization runs(${sm}) reached.`)}class en{constructor(t){Object.defineProperty(this,"signal",{enumerable:!0,get:t})}static fromName(t,n){return new en(()=>t(n))}}function PR(e){At(e)?Q0e(e):e1e(e)}function Q0e(e){const t=e.component.scales;for(const n of G(t)){const i=n1e(e,n);if(t[n].setWithExplicit("domains",i),r1e(e,n),e.component.data.isFaceted){let s=e;for(;!Cr(s)&&s.parent;)s=s.parent;if(s.component.resolve.scale[n]==="shared")for(const a of i.value)Gs(a)&&(a.data=Aw+a.data.replace(Aw,""))}}}function e1e(e){for(const n of e.children)PR(n);const t=e.component.scales;for(const n of G(t)){let i,r=null;for(const s of e.children){const o=s.component.scales[n];if(o){i===void 0?i=o.getWithExplicit("domains"):i=ia(i,o.getWithExplicit("domains"),"domains","scale",Dw);const a=o.get("selectionExtent");r&&a&&r.param!==a.param&&Y(ife),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}function t1e(e,t,n,i){if(e==="unaggregated"){const{valid:r,reason:s}=BR(t,n);if(!r){Y(s);return}}else if(e===void 0&&i.useUnaggregatedDomain){const{valid:r}=BR(t,n);if(r)return"unaggregated"}return e}function n1e(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=t1e(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),t==="x"&&Ut(i.x2)?Ut(i.x)?ia(la(n,r,e,"x"),la(n,r,e,"x2"),"domain","scale",Dw):la(n,r,e,"x2"):t==="y"&&Ut(i.y2)?Ut(i.y)?ia(la(n,r,e,"y"),la(n,r,e,"y2"),"domain","scale",Dw):la(n,r,e,"y2"):la(n,r,e,t)}function i1e(e,t,n){return e.map(i=>({signal:`{data: ${z1(i,{timeUnit:n,type:t})}}`}))}function Mw(e,t,n){var r;const i=(r=Kt(n))==null?void 0:r.unit;return t==="temporal"||i?i1e(e,t,i):[e]}function la(e,t,n,i){const{encoding:r,markDef:s,mark:o,config:a,stack:l}=n,u=Ut(r[i]),{type:c}=u,f=u.timeUnit;if(Cde(t)){const p=la(e,void 0,n,i),g=Mw(t.unionWith,c,f);return ps([...g,...p.value])}else{if(de(t))return ps([t]);if(t&&t!=="unaggregated"&&!YD(t))return ps(Mw(t,c,f))}if(l&&i===l.fieldChannel){if(l.offset==="normalize")return Ci([[0,1]]);const p=n.requestDataName(yt.Main);return Ci([{data:p,field:n.vgField(i,{suffix:"start"})},{data:p,field:n.vgField(i,{suffix:"end"})}])}const d=Ws(i)&&Z(u)?s1e(n,i,e):void 0;if(fs(u)){const p=Mw([u.datum],c,f);return Ci(p)}const h=u;if(t==="unaggregated"){const p=n.requestDataName(yt.Main),{field:g}=u;return Ci([{data:p,field:Q({field:g,aggregate:"min"})},{data:p,field:Q({field:g,aggregate:"max"})}])}else if(mt(h.bin)){if(Jt(e))return Ci(e==="bin-ordinal"?[]:[{data:Nd(d)?n.requestDataName(yt.Main):n.requestDataName(yt.Raw),field:n.vgField(i,Vd(h,i)?{binSuffix:"range"}:{}),sort:d===!0||!ie(d)?{field:n.vgField(i,{}),op:"min"}:d}]);{const{bin:p}=h;if(mt(p)){const g=kw(n,h.field,p);return Ci([new en(()=>{const m=n.getSignalName(g);return`[${m}.start, ${m}.stop]`})])}else return Ci([{data:n.requestDataName(yt.Main),field:n.vgField(i,{})}])}}else if(h.timeUnit&&Pe(["time","utc"],e)){const p=r[os(i)];if(pN(h,p,s,a)){const g=n.requestDataName(yt.Main),m=ta({fieldDef:h,fieldDef2:p,markDef:s,config:a}),y=Ud(o)&&m!==.5&&Nt(i);return Ci([{data:g,field:n.vgField(i,y?{suffix:X1}:{})},{data:g,field:n.vgField(i,{suffix:y?Y1:"end"})}])}}return Ci(d?[{data:Nd(d)?n.requestDataName(yt.Main):n.requestDataName(yt.Raw),field:n.vgField(i),sort:d}]:[{data:n.requestDataName(yt.Main),field:n.vgField(i)}])}function Fw(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":T1),...i?{field:ji(i)}:{},...r?{order:r}:{}}}function r1e(e,t){var a;const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=(a=e.fieldDef(t))==null?void 0:a.bin,s=YD(i)&&i,o=al(r)&&b1(r.extent)&&r.extent;(s||o)&&n.set("selectionExtent",s??o,!0)}function s1e(e,t,n){if(!Jt(n))return;const i=e.fieldDef(t),r=i.sort;if(fN(r))return{op:"min",field:mc(i,t),order:"ascending"};const{stack:s}=e,o=s?new Set([...s.groupbyFields,...s.stackBy.map(a=>a.fieldDef.field)]):void 0;if(cs(r)){const a=s&&!o.has(r.field);return Fw(r,a)}else if(cN(r)){const{encoding:a,order:l}=r,u=e.fieldDef(a),{aggregate:c,field:f}=u,d=s&&!o.has(f);if(Hs(c)||Ko(c))return Fw({field:Q(u),order:l},d);if(i_(c)||!c)return Fw({op:c,field:f,order:l},d)}else{if(r==="descending")return{op:"min",field:e.vgField(t),order:"descending"};if(Pe(["ascending",void 0],r))return!0}}function BR(e,t){const{aggregate:n,type:i}=e;return n?te(n)&&!Uce.has(n)?{valid:!1,reason:Tfe(n)}:i==="quantitative"&&t==="log"?{valid:!1,reason:Mfe(e)}:{valid:!0}:{valid:!1,reason:Afe(e)}}function Dw(e,t,n,i){return e.explicit&&t.explicit&&Y(Rfe(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function o1e(e){const t=ns(e.map(o=>{if(Gs(o)){const{sort:a,...l}=o;return l}return o}),ze),n=ns(e.map(o=>{if(Gs(o)){const a=o.sort;return a!==void 0&&!Nd(a)&&("op"in a&&a.op==="count"&&delete a.field,a.order==="ascending"&&delete a.order),a}}).filter(o=>o!==void 0),ze);if(t.length===0)return;if(t.length===1){const o=e[0];if(Gs(o)&&n.length>0){let a=n[0];if(n.length>1){Y(AD);const l=n.filter(u=>ie(u)&&"op"in u&&u.op!=="min");n.every(u=>ie(u)&&"op"in u)&&l.length===1?a=l[0]:a=!0}else if(ie(a)&&"field"in a){const l=a.field;o.field===l&&(a=a.order?{order:a.order}:!0)}return{...o,sort:a}}return o}const i=ns(n.map(o=>Nd(o)||!("op"in o)||te(o.op)&&o.op in zce?o:(Y(Ife(o)),!0)),ze);let r;i.length===1?r=i[0]:i.length>1&&(Y(AD),r=!0);const s=ns(e.map(o=>Gs(o)?o.data:null),o=>o);return s.length===1&&s[0]!==null?{data:s[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}function Nw(e){if(Gs(e)&&te(e.field))return e.field;if(qce(e)){let t;for(const n of e.fields)if(Gs(n)&&te(n.field)){if(!t)t=n.field;else if(t!==n.field)return Y(zfe),t}return Y(Pfe),t}else if(Wce(e)){Y(Bfe);const t=e.fields[0];return te(t)?t:void 0}}function om(e,t){const i=e.component.scales[t].get("domains").map(r=>(Gs(r)&&(r.data=e.lookupDataSource(r.data)),r));return o1e(i)}function jR(e){return xc(e)||Rw(e)?e.children.reduce((t,n)=>t.concat(jR(n)),UR(e)):UR(e)}function UR(e){return G(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:s,type:o,selectionExtent:a,domains:l,range:u,reverse:c,...f}=r,d=a1e(r.range,s,n,e),h=om(e,n),p=a?tge(e,a,i,h):null;return t.push({name:s,type:o,...h?{domain:h}:{},...p?{domainRaw:p}:{},range:d,...c!==void 0?{reverse:c}:{},...f}),t},[])}function a1e(e,t,n,i){if(Nt(n)){if(Qo(e))return{step:{signal:`${t}_step`}}}else if(ie(e)&&Gs(e))return{...e,data:i.lookupDataSource(e.data)};return e}class qR extends Zs{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:nl(this.get("domains"),t=>q(t)&&t.length===2&&Xe(t[0])&&t[0]<=0&&Xe(t[1])&&t[1]>=0)}}const l1e=["range","scheme"];function u1e(e){const t=e.component.scales;for(const n of y1){const i=t[n];if(!i)continue;const r=c1e(n,e);i.setWithExplicit("range",r)}}function WR(e,t){const n=e.fieldDef(t);if(n!=null&&n.bin){const{bin:i,field:r}=n,s=ai(t),o=e.getName(s);if(ie(i)&&i.binned&&i.step!==void 0)return new en(()=>{const a=e.scaleName(t),l=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(o)} / (${l})`});if(mt(i)){const a=kw(e,r,i);return new en(()=>{const l=e.getSignalName(a),u=`(${l}.stop - ${l}.start) / ${l}.step`;return`${e.getSignalName(o)} / (${u})`})}}}function c1e(e,t){const n=t.specifiedScales[e],{size:i}=t,s=t.getScaleComponent(e).get("type");for(const f of l1e)if(n[f]!==void 0){const d=k_(s,f),h=ZD(e,f);if(!d)Y(CD(s,f,e));else if(h)Y(h);else switch(f){case"range":{const p=n.range;if(q(p)){if(Nt(e))return ps(p.map(g=>{if(g==="width"||g==="height"){const m=t.getName(g),y=t.getSignalName.bind(t);return en.fromName(y,m)}return g}))}else if(ie(p))return ps({data:t.requestDataName(yt.Main),field:p.field,sort:{op:"min",field:t.vgField(e)}});return ps(p)}case"scheme":return ps(f1e(n[f]))}}const o=e===wt||e==="xOffset"?"width":"height",a=i[o];if(hs(a)){if(Nt(e))if(Jt(s)){const f=GR(a,t,e);if(f)return ps({step:f})}else Y(SD(o));else if(Pd(e)){const f=e===Ho?"x":"y";if(t.getScaleComponent(f).get("type")==="band"){const p=VR(a,s);if(p)return ps(p)}}}const{rangeMin:l,rangeMax:u}=n,c=d1e(e,t);return(l!==void 0||u!==void 0)&&k_(s,"rangeMin")&&q(c)&&c.length===2?ps([l??c[0],u??c[1]]):Ci(c)}function f1e(e){return Ede(e)?{scheme:e.name,...ri(e,["name"])}:{scheme:e}}function HR(e,t,n,{center:i}={}){const r=ai(e),s=t.getName(r),o=t.getSignalName.bind(t);return e===Zt&&Ei(n)?i?[en.fromName(a=>`${o(a)}/2`,s),en.fromName(a=>`-${o(a)}/2`,s)]:[en.fromName(o,s),0]:i?[en.fromName(a=>`-${o(a)}/2`,s),en.fromName(a=>`${o(a)}/2`,s)]:[0,en.fromName(o,s)]}function d1e(e,t){const{size:n,config:i,mark:r,encoding:s}=t,{type:o}=Ut(s[e]),l=t.getScaleComponent(e).get("type"),{domain:u,domainMid:c}=t.specifiedScales[e];switch(e){case wt:case Zt:{if(Pe(["point","band"],l)){const f=XR(e,n,i.view);if(hs(f))return{step:GR(f,t,e)}}return HR(e,t,l)}case Ho:case Ku:return h1e(e,t,l);case Us:{const f=t.component.scales[e].get("zero"),d=YR(r,f,i),h=m1e(r,n,t,i);return ic(l)?g1e(d,h,p1e(l,i,u,e)):[d,h]}case Ui:return[0,Math.PI*2];case rl:return[0,360];case gr:return[0,new en(()=>{const f=t.getSignalName("width"),d=t.getSignalName("height");return`min(${f},${d})/2`})];case Xo:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case Yo:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case oi:return"symbol";case si:case rs:case ss:return l==="ordinal"?o==="nominal"?"category":"ordinal":c!==void 0?"diverging":r==="rect"||r==="geoshape"?"heatmap":"ramp";case qs:case Go:case Vo:return[i.scale.minOpacity,i.scale.maxOpacity]}}function GR(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),s=J7(n),o=i[s];if(YN({step:e,offsetIsDiscrete:Se(o)&&qD(o.type)})==="offset"&&TN(i,s)){const l=t.getScaleComponent(s);let c=`domain('${t.scaleName(s)}').length`;if(l.get("type")==="band"){const d=l.get("paddingInner")??l.get("padding")??0,h=l.get("paddingOuter")??l.get("padding")??0;c=`bandspace(${c}, ${d}, ${h})`}const f=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${c} / (1-${Vce(f)})`}}else return e.step}function VR(e,t){if(YN({step:e,offsetIsDiscrete:Jt(t)})==="offset")return{step:e.step}}function h1e(e,t,n){const i=e===Ho?"x":"y",r=t.getScaleComponent(i);if(!r)return HR(i,t,n,{center:!0});const s=r.get("type"),o=t.scaleName(i),{markDef:a,config:l}=t;if(s==="band"){const u=XR(i,t.size,t.config.view);if(hs(u)){const c=VR(u,n);if(c)return c}return[0,{signal:`bandwidth('${o}')`}]}else{const u=t.encoding[i];if(Z(u)&&u.timeUnit){const c=PD(u.timeUnit,p=>`scale('${o}', ${p})`),f=t.config.scale.bandWithNestedOffsetPaddingInner,d=ta({fieldDef:u,markDef:a,config:l})-.5,h=d!==0?` + ${d}`:"";if(f){const p=de(f)?`${f.signal}/2`+h:`${f/2+d}`,g=de(f)?`(1 - ${f.signal}/2)`+h:`${1-f/2+d}`;return[{signal:`${p} * (${c})`},{signal:`${g} * (${c})`}]}return[0,{signal:c}]}return LF(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}function XR(e,t,n){const i=e===wt?"width":"height",r=t[i];return r||H1(n,i)}function p1e(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return n!==void 0&&q(n)?n.length+1:(Y(Yfe(i)),3)}}function g1e(e,t,n){const i=()=>{const r=vr(t),s=vr(e),o=`(${r} - ${s}) / (${n} - 1)`;return`sequence(${s}, ${r} + ${o}, ${o})`};return de(t)?new en(i):{signal:i()}}function YR(e,t,n){if(t)return de(t)?{signal:`${t.signal} ? 0 : ${YR(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(x1("size",e))}const ZR=.95;function m1e(e,t,n,i){const r={x:WR(n,"x"),y:WR(n,"y")};switch(e){case"bar":case"tick":{if(i.scale.maxBandSize!==void 0)return i.scale.maxBandSize;const s=KR(t,r,i.view);return Xe(s)?s-1:new en(()=>`${s.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const s=KR(t,r,i.view);return Xe(s)?Math.pow(ZR*s,2):new en(()=>`pow(${ZR} * ${s.signal}, 2)`)}}throw new Error(x1("size",e))}function KR(e,t,n){const i=hs(e.width)?e.width.step:W1(n,"width"),r=hs(e.height)?e.height.step:W1(n,"height");return t.x||t.y?new en(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function JR(e,t){At(e)?y1e(e,t):tL(e,t)}function y1e(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:s,specifiedScales:o}=e;for(const a of G(n)){const l=o[a],u=n[a],c=e.getScaleComponent(a),f=Ut(r[a]),d=l[t],h=c.get("type"),p=c.get("padding"),g=c.get("paddingInner"),m=k_(h,t),y=ZD(a,t);if(d!==void 0&&(m?y&&Y(y):Y(CD(h,t,a))),m&&y===void 0)if(d!==void 0){const b=f.timeUnit,v=f.type;switch(t){case"domainMax":case"domainMin":ll(l[t])||v==="temporal"||b?u.set(t,{signal:z1(l[t],{type:v,timeUnit:b})},!0):u.set(t,l[t],!0);break;default:u.copyKeyFromObject(t,l)}}else{const b=t in QR?QR[t]({model:e,channel:a,fieldOrDatumDef:f,scaleType:h,scalePadding:p,scalePaddingInner:g,domain:l.domain,domainMin:l.domainMin,domainMax:l.domainMax,markDef:s,config:i,hasNestedOffsetScale:MN(r,a),hasSecondaryRangeChannel:!!r[os(a)]}):i.scale[t];b!==void 0&&u.set(t,b,!1)}}}const QR={bins:({model:e,fieldOrDatumDef:t})=>Z(t)?b1e(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>v1e(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:s})=>x1e(e,t,n,i,r,s),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>_1e(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:s})=>w1e(e,t,n.type,i,r.scale,s),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:s})=>k1e(e,t,n,i,r.scale,s),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>{const r=Z(e)?e.sort:void 0;return $1e(t,r,n,i.scale)},zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:s,hasSecondaryRangeChannel:o})=>E1e(e,t,n,i,r,s.scale,o)};function eL(e){At(e)?u1e(e):tL(e,"range")}function tL(e,t){const n=e.component.scales;for(const i of e.children)t==="range"?eL(i):JR(i,t);for(const i of G(n)){let r;for(const s of e.children){const o=s.component.scales[i];if(o){const a=o.getWithExplicit(t);r=ia(r,a,t,"scale",_O((l,u)=>{switch(t){case"range":return l.step&&u.step?l.step-u.step:0}return 0}))}}n[i].setWithExplicit(t,r)}}function b1e(e,t){const n=t.bin;if(mt(n)){const i=kw(e,t.field,n);return new en(()=>e.getSignalName(i))}else if(un(n)&&al(n)&&n.step!==void 0)return{step:n.step}}function v1e(e,t){if(Pe([si,rs,ss],e)&&t!=="nominal")return"hcl"}function x1e(e,t,n,i,r,s){var o;if(!((o=ds(s))!=null&&o.bin||q(n)||r!=null||i!=null||Pe([ui.TIME,ui.UTC],e)))return Nt(t)?!0:void 0}function _1e(e,t,n,i,r,s){if(Nt(e)){if(xr(t)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:o,orient:a}=r;if(o==="bar"&&!(Z(i)&&(i.bin||i.timeUnit))&&(a==="vertical"&&e==="x"||a==="horizontal"&&e==="y"))return s.continuousBandSize}if(t===ui.POINT)return n.pointPadding}}function w1e(e,t,n,i,r,s=!1){if(e===void 0){if(Nt(t)){const{bandPaddingInner:o,barBandPaddingInner:a,rectBandPaddingInner:l,bandWithNestedOffsetPaddingInner:u}=r;return s?u:Dt(o,n==="bar"?a:l)}else if(Pd(t)&&i===ui.BAND)return r.offsetBandPaddingInner}}function k1e(e,t,n,i,r,s=!1){if(e===void 0){if(Nt(t)){const{bandPaddingOuter:o,bandWithNestedOffsetPaddingOuter:a}=r;if(s)return a;if(n===ui.BAND)return Dt(o,de(i)?{signal:`${i.signal}/2`}:i/2)}else if(Pd(t)){if(n===ui.POINT)return .5;if(n===ui.BAND)return r.offsetBandPaddingOuter}}}function $1e(e,t,n,i){if(n==="x"&&i.xReverse!==void 0)return Ei(e)&&t==="descending"?de(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse;if(Ei(e)&&t==="descending")return!0}function E1e(e,t,n,i,r,s,o){if(!!n&&n!=="unaggregated"&&Ei(r)){if(q(n)){const l=n[0],u=n[n.length-1];if(Xe(l)&&l<=0&&Xe(u)&&u>=0)return!0}return!1}if(e==="size"&&t.type==="quantitative"&&!ic(r))return!0;if(!(Z(t)&&t.bin)&&Pe([...as,...Mce],e)){const{orient:l,type:u}=i;return Pe(["bar","area","line","trail"],u)&&(l==="horizontal"&&e==="y"||l==="vertical"&&e==="x")?!1:Pe(["bar","area"],u)&&!o?!0:s==null?void 0:s.zero}return!1}function C1e(e,t,n,i,r=!1){const s=S1e(t,n,i,r),{type:o}=e;return Ws(t)?o!==void 0?Dde(t,o)?Z(n)&&!Fde(o,n.type)?(Y(Nfe(o,s)),s):o:(Y(Dfe(t,o,s)),s):s:null}function S1e(e,t,n,i){var r;switch(t.type){case"nominal":case"ordinal":{if(Qu(e)||n_(e)==="discrete")return e==="shape"&&t.type==="ordinal"&&Y(l_(e,"ordinal")),"ordinal";if(Nt(e)||Pd(e)){if(Pe(["rect","bar","image","rule"],n.type)||i)return"band"}else if(n.type==="arc"&&e in t_)return"band";const s=n[ai(e)];return dl(s)||sc(t)&&((r=t.axis)!=null&&r.tickBand)?"band":"point"}case"temporal":return Qu(e)?"time":n_(e)==="discrete"?(Y(l_(e,"temporal")),"ordinal"):Z(t)&&t.timeUnit&&Kt(t.timeUnit).utc?"utc":"time";case"quantitative":return Qu(e)?Z(t)&&mt(t.bin)?"bin-ordinal":"linear":n_(e)==="discrete"?(Y(l_(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error($D(t.type))}function A1e(e,{ignoreRange:t}={}){nL(e),PR(e);for(const n of Mde)JR(e,n);t||eL(e)}function nL(e){At(e)?e.component.scales=T1e(e):e.component.scales=F1e(e)}function T1e(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const s of y1){const o=Ut(t[s]);if(o&&n===QD&&s===oi&&o.type===nc)continue;let a=o&&o.scale;if(o&&a!==null&&a!==!1){a??(a={});const l=MN(t,s),u=C1e(a,s,o,i,l);r[s]=new qR(e.scaleName(`${s}`,!0),{value:u,explicit:a.type===u})}}return r}const M1e=_O((e,t)=>WD(e)-WD(t));function F1e(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const s of e.children){nL(s);for(const o of G(s.component.scales))if((t=r.scale)[o]??(t[o]=vR(o,e)),r.scale[o]==="shared"){const a=i[o],l=s.component.scales[o].getWithExplicit("type");a?xde(a.value,l.value)?i[o]=ia(a,l,"type","scale",M1e):(r.scale[o]="independent",delete i[o]):i[o]=l}}for(const s of G(i)){const o=e.scaleName(s,!0),a=i[s];n[s]=new qR(o,a);for(const l of e.children){const u=l.component.scales[s];u&&(l.renameScale(u.get("name"),o),u.merged=!0)}}return n}class Ow{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return this.nameMap[t]!==void 0}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function At(e){return(e==null?void 0:e.type)==="unit"}function Cr(e){return(e==null?void 0:e.type)==="facet"}function Rw(e){return(e==null?void 0:e.type)==="concat"}function xc(e){return(e==null?void 0:e.type)==="layer"}class Lw{constructor(t,n,i,r,s,o,a){this.type=n,this.parent=i,this.config=s,this.correctDataNames=l=>{var u,c,f;return(u=l.from)!=null&&u.data&&(l.from.data=this.lookupDataSource(l.from.data)),(f=(c=l.from)==null?void 0:c.facet)!=null&&f.data&&(l.from.facet.data=this.lookupDataSource(l.from.facet.data)),l},this.parent=i,this.config=s,this.view=li(a),this.name=t.name??r,this.title=Jo(t.title)?{text:t.title}:t.title?li(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new Ow,this.projectionNameMap=i?i.projectionNameMap:new Ow,this.signalNameMap=i?i.signalNameMap:new Ow,this.data=t.data,this.description=t.description,this.transforms=zpe(t.transform??[]),this.layout=n==="layer"||n==="unit"?{}:qhe(t,n,s),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:M1(t)||(i==null?void 0:i.component.data.isFaceted)&&t.data===void 0},layoutSize:new Zs,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...o?Ce(o):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){A1e(this)}parseProjection(){DR(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){SR(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const s of G(i)){const o=i[s];o!==void 0&&(r[s]=vt(o))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!t&&(this.description&&(n.description=vt(this.description)),this.type==="unit"||this.type==="layer")?{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n??{}}:lt(n)?void 0:n}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,s=Jge(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...s?{titleBand:s}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Wi)t[i].title&&n.push(Gge(this,i));for(const i of yw)n=n.concat(Vge(this,i));return n}assembleAxes(){return Nge(this.component.axes,this.config)}assembleLegends(){return TR(this)}assembleProjections(){return _0e(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...oD(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return Pe(["unit","layer"],this.type)?Pe(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),lt(i)?void 0:i}assembleGroup(t=[]){const n={};t=t.concat(this.assembleSignals()),t.length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||Cr(this.parent)?jR(this):[];r.length>0&&(n.scales=r);const s=this.assembleAxes();s.length>0&&(n.axes=s);const o=this.assembleLegends();return o.length>0&&(n.legends=o),n}getName(t){return _t((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(yt[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(Cr(this.parent)){const n=yR(t),i=m1(n),r=this.component.scales[i];if(r&&!r.merged){const s=r.get("type"),o=r.get("range");if(Jt(s)&&Qo(o)){const a=r.get("name"),l=om(this,i),u=Nw(l);if(u){const c=Q({aggregate:"distinct",field:u},{expr:"datum"});return{signal:mR(a,r,c)}}else return Y(o_(i)),null}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){if(n)return this.getName(t);if(ZF(t)&&Ws(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t)))return this.scaleNameMap.get(this.getName(t))}projectionName(t){if(t)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(Jce(n));return i}hasAxisOrientSignalRef(){var t,n;return((t=this.component.axes.x)==null?void 0:t.some(i=>i.hasOrientSignalRef()))||((n=this.component.axes.y)==null?void 0:n.some(i=>i.hasOrientSignalRef()))}}class iL extends Lw{vgField(t,n={}){const i=this.fieldDef(t);if(i)return Q(i,n)}reduceFieldDef(t,n){return xhe(this.getMapping(),(i,r,s)=>{const o=ds(r);return o?t(i,o,s):i},n)}forEachFieldDef(t,n){z_(this.getMapping(),(i,r)=>{const s=ds(i);s&&t(s,r)},n)}}class am extends ot{clone(){return new am(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"]}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${ze(this.transform)}`}assemble(){const{density:t,...n}=this.transform,i={type:"kde",field:t,...n};return this.transform.groupby&&(i.resolve="shared"),i}}class lm extends ot{clone(){return new lm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${ze(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class nh extends ot{clone(){return new nh(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n){const{config:i,mark:r,markDef:s}=n;if(it("invalid",s,i)!=="filter")return null;const a=n.reduceFieldDef((l,u,c)=>{const f=Ws(c)&&n.getScaleComponent(c);if(f){const d=f.get("type");Ei(d)&&u.aggregate!=="count"&&!ea(r)&&(l[u.field]=u)}return l},{});return G(a).length?new nh(t,a):null}dependentFields(){return new Set(G(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${ze(this.filter)}`}assemble(){const t=G(this.filter).reduce((n,i)=>{const r=this.filter[i],s=Q(r,{expr:"datum"});return r!==null&&(r.type==="temporal"?n.push(`(isDate(${s}) || (isValid(${s}) && isFinite(+${s})))`):r.type==="quantitative"&&(n.push(`isValid(${s})`),n.push(`isFinite(+${s})`))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}class um extends ot{clone(){return new um(this.parent,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((s,o)=>r[o]??s)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${ze(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class cm extends ot{clone(){return new cm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${ze(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class _c extends ot{clone(){return new _c(null,Ce(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[yr,mr],[qi,br]]){const s=r.map(o=>{const a=Ut(n.encoding[o]);return Z(a)?a.field:fs(a)?{expr:`${a.datum}`}:wr(a)?{expr:`${a.value}`}:void 0});(s[0]||s[1])&&(t=new _c(t,s,null,n.getName(`geojson_${i++}`)))}if(n.channelHasField(oi)){const r=n.typedFieldDef(oi);r.type===nc&&(t=new _c(t,null,r.field,n.getName(`geojson_${i++}`)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(te);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${ze(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class ih extends ot{clone(){return new ih(null,this.projection,Ce(this.fields),Ce(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[yr,mr],[qi,br]]){const r=i.map(o=>{const a=Ut(n.encoding[o]);return Z(a)?a.field:fs(a)?{expr:`${a.datum}`}:wr(a)?{expr:`${a.value}`}:void 0}),s=i[0]===qi?"2":"";(r[0]||r[1])&&(t=new ih(t,n.projectionName(),r,[n.getName(`x${s}`),n.getName(`y${s}`)]))}return t}dependentFields(){return new Set(this.fields.filter(te))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${ze(this.fields)} ${ze(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class kl extends ot{clone(){return new kl(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new kl(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,s=i.y;if(Z(r)&&Z(s)){const o=r.impute?r:s.impute?s:void 0;if(o===void 0)return;const a=r.impute?s:s.impute?r:void 0,{method:l,value:u,frame:c,keyvals:f}=o.impute,d=DN(n.mark,i);return new kl(t,{impute:o.field,key:a.field,...l?{method:l}:{},...u!==void 0?{value:u}:{},...c?{frame:c}:{},...f!==void 0?{keyvals:f}:{},...d.length?{groupby:d}:{}})}return null}hash(){return`Impute ${ze(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:s,value:o,frame:a=[null,null]}=this.transform,l={type:"impute",field:t,key:n,...i?{keyvals:vpe(i)?this.processSequence(i):i}:{},method:"value",...s?{groupby:s}:{},value:!r||r==="value"?o:null};if(r&&r!=="value"){const u={type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...s?{groupby:s}:{}},c={type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t};return[l,u,c]}else return[l]}}class fm extends ot{clone(){return new fm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${ze(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class rh extends ot{clone(){return new rh(null,Ce(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const s=n.component.data.sources,{from:o}=i;let a=null;if(xpe(o)){let l=aL(o.data,s);l||(l=new xl(o.data),s.push(l));const u=n.getName(`lookup_${r}`);a=new qn(l,u,yt.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[u]=a}else if(_pe(o)){const l=o.param;i={as:l,...i};let u;try{u=n.getSelectionComponent(_t(l),l)}catch{throw new Error(tfe(l))}if(a=u.materialized,!a)throw new Error(nfe(l))}return new rh(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?ee(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${ze({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:ee(this.transform.as)}:{}};else{let n=this.transform.as;te(n)||(Y(cfe),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class dm extends ot{clone(){return new dm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${ze(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class hm extends ot{clone(){return new hm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=Ce(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${ze(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class pm extends ot{clone(){return new pm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=ns((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${ze(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:s}=this.transform;return{type:"pivot",field:t,value:n,...r!==void 0?{limit:r}:{},...s!==void 0?{op:s}:{},...i!==void 0?{groupby:i}:{}}}}class gm extends ot{clone(){return new gm(null,Ce(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${ze(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function rL(e){let t=0;function n(i,r){if(i instanceof xl&&!i.isGenerator&&!cc(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof En&&(i.parent instanceof xl&&!r.source?(r.format={...r.format??{},parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof bc){r.name||(r.name=`data_${t++}`),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,e.push(...i.assemble());return}switch((i instanceof Qd||i instanceof eh||i instanceof nh||i instanceof pc||i instanceof gc||i instanceof ih||i instanceof $r||i instanceof rh||i instanceof vc||i instanceof wl||i instanceof cm||i instanceof um||i instanceof am||i instanceof fm||i instanceof dm||i instanceof hm||i instanceof aa||i instanceof gm||i instanceof pm||i instanceof lm)&&r.transform.push(i.assemble()),(i instanceof ms||i instanceof gs||i instanceof kl||i instanceof Js||i instanceof _c)&&r.transform.push(...i.assemble()),i instanceof qn&&(r.source&&r.transform.length===0?i.setSource(r.source):i.parent instanceof qn?i.setSource(r.name):(r.name||(r.name=`data_${t++}`),i.setSource(r.name),i.numChildren()===1&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof qn&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name=`data_${t++}`);let s=r.name;!r.source||r.transform.length>0?e.push(r):s=r.source;for(const o of i.children)n(o,{name:null,source:s,transform:[]});break}}}return n}function D1e(e){const t=[],n=rL(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}function N1e(e,t){const n=[],i=rL(n);let r=0;for(const o of e.sources){o.hasName()||(o.dataName=`source_${r++}`);const a=o.assemble();i(o,a)}for(const o of n)o.transform.length===0&&delete o.transform;let s=0;for(const[o,a]of n.entries())(a.transform??[]).length===0&&!a.source&&n.splice(s++,0,n.splice(o,1)[0]);for(const o of n)for(const a of o.transform??[])a.type==="lookup"&&(a.from=e.outputNodes[a.from].getSource());for(const o of n)o.name in t&&(o.values=t[o.name]);return n}function O1e(e){return e==="top"||e==="left"||de(e)?"header":"footer"}function R1e(e){for(const t of Wi)L1e(e,t);oL(e,"x"),oL(e,"y")}function L1e(e,t){var o;const{facet:n,config:i,child:r,component:s}=e;if(e.channelHasField(t)){const a=n[t],l=yc("title",null,i,t);let u=oc(a,i,{allowDisabling:!0,includeDefault:l===void 0||!!l});r.component.layoutHeaders[t].title&&(u=q(u)?u.join(", "):u,u+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const c=yc("labelOrient",a.header,i,t),f=a.header!==null?Dt((o=a.header)==null?void 0:o.labels,i.header.labels,!0):!1,d=Pe(["bottom","right"],c)?"footer":"header";s.layoutHeaders[t]={title:a.header!==null?u:null,facetFieldDef:a,[d]:t==="facet"?[]:[sL(e,t,f)]}}}function sL(e,t,n){const i=t==="row"?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function oL(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=_w(r,t),r.axis[t]==="shared"){const s=t==="x"?"column":"row",o=i[s];for(const a of n.component.axes[t]){const l=O1e(a.get("orient"));o[l]??(o[l]=[sL(e,s,!1)]);const u=Jd(a,"main",e.config,{header:!0});u&&o[l][0].axes.push(u),a.mainExtracted=!0}}}}function I1e(e){Iw(e),mm(e,"width"),mm(e,"height")}function z1e(e){Iw(e);const t=e.layout.columns===1?"width":"childWidth",n=e.layout.columns===void 0?"height":"childHeight";mm(e,t),mm(e,n)}function Iw(e){for(const t of e.children)t.parseLayoutSize()}function mm(e,t){const n=yR(t),i=m1(n),r=e.component.resolve,s=e.component.layoutSize;let o;for(const a of e.children){const l=a.component.layoutSize.getWithExplicit(n),u=r.scale[i]??vR(i,e);if(u==="independent"&&l.value==="step"){o=void 0;break}if(o){if(u==="independent"&&o.value!==l.value){o=void 0;break}o=ia(o,l,n,"")}else o=l}if(o){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);s.setWithExplicit(t,o)}else s.setWithExplicit(t,{explicit:!1,value:void 0})}function P1e(e){const{size:t,component:n}=e;for(const i of as){const r=ai(i);if(t[r]){const s=t[r];n.layoutSize.set(r,hs(s)?"step":s,!0)}else{const s=B1e(e,r);n.layoutSize.set(r,s,!1)}}}function B1e(e,t){const n=t==="width"?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const s=r.get("type"),o=r.get("range");if(Jt(s)){const a=H1(i.view,t);return Qo(o)||hs(a)?"step":a}else return Z_(i.view,t)}else{if(e.hasProjection||e.mark==="arc")return Z_(i.view,t);{const s=H1(i.view,t);return hs(s)?s.step:s}}}function zw(e,t,n){return Q(t,{suffix:`by_${Q(e)}`,...n??{}})}class sh extends iL{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=qw(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!Hd(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=G(t),i={};for(const r of n){if(![zs,Ps].includes(r)){Y(x1(r,"facet"));break}const s=t[r];if(s.field===void 0){Y(a_(s,r));break}i[r]=this.initFacetFieldDef(s,r)}return i}initFacetFieldDef(t,n){const i=L_(t,n);return i.header?i.header=li(i.header):i.header===null&&(i.header=null),i}channelHasField(t){return!!this.facet[t]}fieldDef(t){return this.facet[t]}parseData(){this.component.data=ym(this),this.child.parseData()}parseLayoutSize(){Iw(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),R1e(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Wi)for(const i of bw){const r=this.component.layoutHeaders[n],s=r[i],{facetFieldDef:o}=r;if(o){const a=yc("titleOrient",o.header,this.config,n);if(["right","bottom"].includes(a)){const l=nm(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[l]="end"}}if(s!=null&&s[0]){const a=n==="row"?"height":"width",l=i==="header"?"headerBand":"footerBand";n!=="facet"&&!this.child.component.layoutSize.get(a)&&(t[l]??(t[l]={}),t[l][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset[n==="row"?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&this.component.resolve.scale.x==="independent"||!t&&this.component.resolve.scale.y==="independent")&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof sh))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof sh?{...this.channelHasField("column")?{encode:{update:{columns:{field:Q(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof sh){if(this.child.channelHasField("column")){const r=Q(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of as){const s=this.child.component.scales[r];if(s&&!s.merged){const o=s.get("type"),a=s.get("range");if(Jt(o)&&Qo(a)){const l=om(this.child,r),u=Nw(l);u?(t.push(u),n.push("distinct"),i.push(`distinct_${u}`)):Y(o_(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:s,ops:o,as:a}=this.getCardinalityAggregateForChild(),l=[];for(const c of Wi){const f=this.facet[c];if(f){l.push(Q(f));const{bin:d,sort:h}=f;if(mt(d)&&l.push(Q(f,{binSuffix:"end"})),cs(h)){const{field:p,op:g=T1}=h,m=zw(f,h);i&&r?(s.push(m),o.push("max"),a.push(m)):(s.push(p),o.push(g),a.push(m))}else if(q(h)){const p=mc(f,c);s.push(p),o.push("max"),a.push(p)}}}const u=!!i&&!!r;return{name:t,data:n,groupby:l,...u||s.length>0?{aggregate:{...u?{cross:u}:{},...s.length?{fields:s,ops:o,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?cs(i.sort)?[zw(i,i.sort,{expr:"datum"})]:q(i.sort)?[mc(i,t,{expr:"datum"})]:[Q(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(cs(r)?r.order:!q(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){var r;const{facet:t,config:n}=this;if(t.facet)return vw(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const s of yw)if(t[s]){const o=yc("labelOrient",(r=t[s])==null?void 0:r.header,n,s);if(i[s].includes(o))return vw(t[s],s,n)}}assembleMarks(){const{child:t}=this,n=this.component.data.facetRoot,i=D1e(n),r=t.assembleGroupEncodeEntry(!1),s=this.assembleLabelTitle()||t.assembleTitle(),o=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...s?{title:s}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:Wi.map(l=>this.facetSortFields(l)).flat(),order:Wi.map(l=>this.facetSortOrder(l)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(Kpe(this,[]))}]}getMapping(){return this.facet}}function j1e(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const s of[n,i])if(cs(s.sort)){const{field:o,op:a=T1}=s.sort;e=r=new wl(e,{joinaggregate:[{op:a,field:o,as:zw(s,s.sort,{forAs:!0})}],groupby:[Q(s)]})}return r}return null}function aL(e,t){var n,i,r,s;for(const o of t){const a=o.data;if(e.name&&o.hasName()&&e.name!==o.dataName)continue;const l=(n=e.format)==null?void 0:n.mesh,u=(i=a.format)==null?void 0:i.feature;if(l&&u)continue;const c=(r=e.format)==null?void 0:r.feature;if((c||u)&&c!==u)continue;const f=(s=a.format)==null?void 0:s.mesh;if(!((l||f)&&l!==f)){if(Yd(e)&&Yd(a)){if(ki(e.values,a.values))return o}else if(cc(e)&&cc(a)){if(e.url===a.url)return o}else if(wO(e)&&e.name===o.dataName)return o}}return null}function U1e(e,t){if(e.data||!e.parent){if(e.data===null){const i=new xl({values:[]});return t.push(i),i}const n=aL(e.data,t);if(n)return ra(e.data)||(n.data.format=IF({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new xl(e.data);return t.push(i),i}}else return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function q1e(e,t,n){let i=0;for(const r of t.transforms){let s,o;if(Fpe(r))o=e=new gc(e,r),s="derived";else if(tw(r)){const a=O0e(r);o=e=En.makeWithAncestors(e,{},a,n)??e,e=new pc(e,t,r.filter)}else if(pO(r))o=e=ms.makeFromTransform(e,r,t),s="number";else if(Npe(r))s="date",n.getWithExplicit(r.field).value===void 0&&(e=new En(e,{[r.field]:s}),n.set(r.field,s,!1)),o=e=gs.makeFromTransform(e,r);else if(Ope(r))o=e=$r.makeFromTransform(e,r),s="number",dw(t)&&(e=new aa(e));else if(hO(r))o=e=rh.make(e,t,r,i++),s="derived";else if(Ape(r))o=e=new vc(e,r),s="number";else if(Tpe(r))o=e=new wl(e,r),s="number";else if(Rpe(r))o=e=Js.makeFromTransform(e,r),s="derived";else if(Lpe(r))o=e=new cm(e,r),s="derived";else if(Ipe(r))o=e=new lm(e,r),s="derived";else if(Mpe(r))o=e=new um(e,r),s="derived";else if(wpe(r))o=e=new pm(e,r),s="derived";else if(Spe(r))e=new gm(e,r);else if(Dpe(r))o=e=kl.makeFromTransform(e,r),s="derived";else if(kpe(r))o=e=new am(e,r),s="derived";else if($pe(r))o=e=new dm(e,r),s="derived";else if(Epe(r))o=e=new hm(e,r),s="derived";else if(Cpe(r))o=e=new fm(e,r),s="derived";else{Y(ufe(r));continue}if(o&&s!==void 0)for(const a of o.producedFields()??[])n.set(a,s,!1)}return e}function ym(e){var g;let t=U1e(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,o=!(r&&(ra(r)||cc(r)||Yd(r)))&&e.parent?e.parent.component.data.ancestorParse.clone():new Ype;ra(r)?(kO(r)?t=new eh(t,r.sequence):rw(r)&&(t=new Qd(t,r.graticule)),o.parseNothing=!0):((g=r==null?void 0:r.format)==null?void 0:g.parse)===null&&(o.parseNothing=!0),t=En.makeExplicit(t,e,o)??t,t=new aa(t);const a=e.parent&&xc(e.parent);(At(e)||Cr(e))&&a&&(t=ms.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=q1e(t,e,o));const l=L0e(e),u=R0e(e);t=En.makeWithAncestors(t,{},{...l,...u},o)??t,At(e)&&(t=_c.parseAll(t,e),t=ih.parseAll(t,e)),(At(e)||Cr(e))&&(a||(t=ms.makeFromEncoding(t,e)??t),t=gs.makeFromEncoding(t,e)??t,t=gc.parseAllForSortIndex(t,e));const c=e.getDataName(yt.Raw),f=new qn(t,c,yt.Raw,i);if(n[c]=f,t=f,At(e)){const m=$r.makeFromEncoding(t,e);m&&(t=m,dw(e)&&(t=new aa(t))),t=kl.makeFromEncoding(t,e)??t,t=Js.makeFromEncoding(t,e)??t}At(e)&&(t=nh.make(t,e)??t);const d=e.getDataName(yt.Main),h=new qn(t,d,yt.Main,i);n[d]=h,t=h,At(e)&&Fge(e,h);let p=null;if(Cr(e)){const m=e.getName("facet");t=j1e(t,e.facet)??t,p=new bc(t,e,m,h.getSource()),n[m]=p}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:f,main:h,facetRoot:p,ancestorParse:o}}class W1e extends Lw{constructor(t,n,i,r){var s,o,a,l;super(t,"concat",n,i,r,t.resolve),(((o=(s=t.resolve)==null?void 0:s.axis)==null?void 0:o.x)==="shared"||((l=(a=t.resolve)==null?void 0:a.axis)==null?void 0:l.y)==="shared")&&Y(ofe),this.children=this.getChildren(t).map((u,c)=>qw(u,this,this.getName(`concat_${c}`),void 0,r))}parseData(){this.component.data=ym(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of G(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return q1(t)?t.vconcat:Y_(t)?t.hconcat:t.concat}parseLayoutSize(){z1e(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=xw(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...t!=null?{columns:t}:{},bounds:"full",align:"each"}}}function H1e(e){return e===!1||e===null}const G1e={disable:1,gridScale:1,scale:1,...CN,labelExpr:1,encode:1},lL=G(G1e);class Pw extends Zs{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new Pw(Ce(this.explicit),Ce(this.implicit),this.mainExtracted)}hasAxisPart(t){return t==="axis"?!0:t==="grid"||t==="title"?!!this.get(t):!H1e(this.get(t))}hasOrientSignalRef(){return de(this.explicit.orient)}}function V1e(e,t,n){const{encoding:i,config:r}=e,s=Ut(i[t])??Ut(i[os(t)]),o=e.axis(t)||{},{format:a,formatType:l}=o;if(pl(l))return{text:_r({fieldOrDatumDef:s,field:"datum.value",format:a,formatType:l,config:r}),...n};if(a===void 0&&l===void 0&&r.customFormatTypes){if(rc(s)==="quantitative"){if(sc(s)&&s.stack==="normalize"&&r.normalizedNumberFormatType)return{text:_r({fieldOrDatumDef:s,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:_r({fieldOrDatumDef:s,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if(rc(s)==="temporal"&&r.timeFormatType&&Z(s)&&!s.timeUnit)return{text:_r({fieldOrDatumDef:s,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}function X1e(e){return as.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[tme(n,e)]),t),{})}const Y1e={bottom:"top",top:"bottom",left:"right",right:"left"};function Z1e(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const s of G(r.component.axes))n.axis[s]=_w(e.component.resolve,s),n.axis[s]==="shared"&&(t[s]=K1e(t[s],r.component.axes[s]),t[s]||(n.axis[s]="independent",delete t[s]))}for(const r of as){for(const s of e.children)if(s.component.axes[r]){if(n.axis[r]==="independent"){t[r]=(t[r]??[]).concat(s.component.axes[r]);for(const o of s.component.axes[r]){const{value:a,explicit:l}=o.getWithExplicit("orient");if(!de(a)){if(i[a]>0&&!l){const u=Y1e[a];i[a]>i[u]&&o.set("orient",u,!1)}i[a]++}}}delete s.component.axes[r]}if(n.axis[r]==="independent"&&t[r]&&t[r].length>1)for(const[s,o]of(t[r]||[]).entries())s>0&&o.get("grid")&&!o.explicit.grid&&(o.implicit.grid=!1)}}function K1e(e,t){if(e){if(e.length!==t.length)return;const n=e.length;for(let i=0;i<n;i++){const r=e[i],s=t[i];if(!!r!=!!s)return;if(r&&s){const o=r.getWithExplicit("orient"),a=s.getWithExplicit("orient");if(o.explicit&&a.explicit&&o.value!==a.value)return;e[i]=J1e(r,s)}}}else return t.map(n=>n.clone());return e}function J1e(e,t){for(const n of lL){const i=ia(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",(r,s)=>{switch(n){case"title":return gD(r,s);case"gridScale":return{explicit:r.explicit,value:Dt(r.value,s.value)}}return V1(r,s,n,"axis")});e.setWithExplicit(n,i)}return e}function Q1e(e,t,n,i,r){if(t==="disable")return n!==void 0;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(de(n.labelAngle)?n.labelAngle:Ld(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===fR(i,r))return!0}return e===n[t]}const eme=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function tme(e,t){var y,b;let n=t.axis(e);const i=new Pw,r=Ut(t.encoding[e]),{mark:s,config:o}=t,a=(n==null?void 0:n.orient)||((y=o[e==="x"?"axisX":"axisY"])==null?void 0:y.orient)||((b=o.axis)==null?void 0:b.orient)||jge(e),l=t.getScaleComponent(e).get("type"),u=Oge(e,l,a,t.config),c=n!==void 0?!n:gw("disable",o.style,n==null?void 0:n.style,u).configValue;if(i.set("disable",c,n!==void 0),c)return i;n=n||{};const f=zge(r,n,e,o.style,u),d=oN(n.formatType,r,l),h=sN(r,r.type,n.format,n.formatType,o,!0),p={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:l,orient:a,labelAngle:f,format:h,formatType:d,mark:s,config:o};for(const v of lL){const x=v in lR?lR[v](p):SN(v)?n[v]:void 0,_=x!==void 0,k=Q1e(x,v,n,t,e);if(_&&k)i.set(v,x,k);else{const{configValue:w=void 0,configFrom:$=void 0}=SN(v)&&v!=="values"?gw(v,o.style,n.style,u):{},S=w!==void 0;_&&!S?i.set(v,x,k):($!=="vgAxisConfig"||eme.has(v)&&S||Xd(w)||de(w))&&i.set(v,w,!1)}}const g=n.encoding??{},m=EN.reduce((v,x)=>{if(!i.hasAxisPart(x))return v;const _=bR(g[x]??{},t),k=x==="labels"?V1e(t,e,_):_;return k!==void 0&&!lt(k)&&(v[x]={update:k}),v},{});return lt(m)||i.set("encode",m,!!n.encoding||n.labelAngle!==void 0),i}function nme({encoding:e,size:t}){for(const n of as){const i=ai(n);hs(t[i])&&na(e[n])&&(delete t[i],Y(SD(i)))}return t}const ime={vgMark:"arc",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...$n("x",e,{defaultPos:"mid"}),...$n("y",e,{defaultPos:"mid"}),...sa(e,"radius"),...sa(e,"theta")})},rme={vgMark:"area",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...K1("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="horizontal"}),...K1("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="vertical"}),...cw(e)})},sme={vgMark:"rect",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...sa(e,"x"),...sa(e,"y")})},ome={vgMark:"shape",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&Z(n)&&n.type===nc?{field:Q(n,{expr:"datum"})}:{}}]}},ame={vgMark:"image",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...sa(e,"x"),...sa(e,"y"),...lw(e,"url")})},lme={vgMark:"line",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...$n("x",e,{defaultPos:"mid"}),...$n("y",e,{defaultPos:"mid"}),...Qt("size",e,{vgChannel:"strokeWidth"}),...cw(e)})},ume={vgMark:"trail",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...$n("x",e,{defaultPos:"mid"}),...$n("y",e,{defaultPos:"mid"}),...Qt("size",e),...cw(e)})};function Bw(e,t){const{config:n}=e;return{...Hi(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...$n("x",e,{defaultPos:"mid"}),...$n("y",e,{defaultPos:"mid"}),...Qt("size",e),...Qt("angle",e),...cme(e,n,t)}}function cme(e,t,n){return n?{shape:{value:n}}:Qt("shape",e)}const fme={vgMark:"symbol",encodeEntry:e=>Bw(e)},dme={vgMark:"symbol",encodeEntry:e=>Bw(e,"circle")},hme={vgMark:"symbol",encodeEntry:e=>Bw(e,"square")},pme={vgMark:"rect",encodeEntry:e=>({...Hi(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...sa(e,"x"),...sa(e,"y")})},gme={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return!e.encoding.x&&!e.encoding.y&&!e.encoding.latitude&&!e.encoding.longitude?{}:{...Hi(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...K1("x",e,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"}),...K1("y",e,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"}),...Qt("size",e,{vgChannel:"strokeWidth"})}}},mme={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...Hi(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...$n("x",e,{defaultPos:"mid"}),...$n("y",e,{defaultPos:"mid"}),...lw(e),...Qt("size",e,{vgChannel:"fontSize"}),...Qt("angle",e),...qO("align",yme(e.markDef,n,t)),...qO("baseline",bme(e.markDef,n,t)),...$n("radius",e,{defaultPos:null}),...$n("theta",e,{defaultPos:null})}}};function yme(e,t,n){if(it("align",e,n)===void 0)return"center"}function bme(e,t,n){if(it("baseline",e,n)===void 0)return"middle"}const vme={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r=i==="horizontal"?"width":"height",s=i==="horizontal"?"height":"width";return{...Hi(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...$n("x",e,{defaultPos:"mid",vgChannel:"xc"}),...$n("y",e,{defaultPos:"mid",vgChannel:"yc"}),...Qt("size",e,{defaultValue:xme(e),vgChannel:r}),[s]:vt(it("thickness",n,t))}}};function xme(e){const{config:t,markDef:n}=e,{orient:i}=n,r=i==="horizontal"?"width":"height",s=e.getScaleComponent(i==="horizontal"?"x":"y"),o=it("size",n,t,{vgChannel:r})??t.tick.bandSize;if(o!==void 0)return o;{const a=s?s.get("range"):void 0;return a&&Qo(a)&&Xe(a.step)?a.step*3/4:W1(t.view,r)*3/4}}const bm={arc:ime,area:rme,bar:sme,circle:dme,geoshape:ome,image:ame,line:lme,point:fme,rect:pme,rule:gme,square:hme,text:mme,tick:vme,trail:ume};function _me(e){if(Pe([E1,k1,Rde],e.mark)){const t=DN(e.mark,e.encoding);if(t.length>0)return wme(e,t)}else if(e.mark===$1){const t=r_.some(n=>it(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return kme(e)}return jw(e)}const uL="faceted_path_";function wme(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:uL+e.requestDataName(yt.Main),data:e.requestDataName(yt.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:jw(e,{fromPrefix:uL})}]}const cL="stack_group_";function kme(e){var u;const[t]=jw(e,{fromPrefix:cL}),n=e.scaleName(e.stack.fieldChannel),i=(c={})=>e.vgField(e.stack.fieldChannel,c),r=(c,f)=>{const d=[i({prefix:"min",suffix:"start",expr:f}),i({prefix:"max",suffix:"start",expr:f}),i({prefix:"min",suffix:"end",expr:f}),i({prefix:"max",suffix:"end",expr:f})];return`${c}(${d.map(h=>`scale('${n}',${h})`).join(",")})`};let s,o;e.stack.fieldChannel==="x"?(s={...Yu(t.encode.update,["y","yc","y2","height",...r_]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},o={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...ri(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(s={...Yu(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},o={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...ri(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const c of r_){const f=Vs(c,e.markDef,e.config);t.encode.update[c]?(s[c]=t.encode.update[c],delete t.encode.update[c]):f&&(s[c]=vt(f)),f&&(t.encode.update[c]={value:0})}const a=[];if(((u=e.stack.groupbyChannels)==null?void 0:u.length)>0)for(const c of e.stack.groupbyChannels){const f=e.fieldDef(c),d=Q(f);d&&a.push(d),(f!=null&&f.bin||f!=null&&f.timeUnit)&&a.push(Q(f,{binSuffix:"end"}))}return s=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((c,f)=>{if(t.encode.update[f])return{...c,[f]:t.encode.update[f]};{const d=Vs(f,e.markDef,e.config);return d!==void 0?{...c,[f]:vt(d)}:c}},s),s.stroke&&(s.strokeForeground={value:!0},s.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(yt.Main),name:cL+e.requestDataName(yt.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:s},marks:[{type:"group",encode:{update:o},marks:[t]}]}]}function $me(e){var a;const{encoding:t,stack:n,mark:i,markDef:r,config:s}=e,o=t.order;if(!(!q(o)&&wr(o)&&U7(o.value)||!o&&U7(it("order",r,s)))){if((q(o)||Z(o))&&!n)return dD(o,{expr:"datum"});if(ea(i)){const l=r.orient==="horizontal"?"y":"x",u=t[l];if(Z(u)){const c=u.sort;if(q(c))return{field:Q(u,{prefix:l,suffix:"sort_index",expr:"datum"})};if(cs(c))return{field:Q({aggregate:I_(e.encoding)?c.op:void 0,field:c.field},{expr:"datum"})};if(cN(c)){const f=e.fieldDef(c.encoding);return{field:Q(f,{expr:"datum"}),order:c.order}}else return c===null?void 0:{field:Q(u,{binSuffix:(a=e.stack)!=null&&a.impute?"mid":void 0,expr:"datum"})}}return}}}function jw(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:s}=e,o=Dt(i.clip,Eme(e),Cme(e)),a=cD(i),l=r.key,u=$me(e),c=Sme(e),f=it("aria",i,s),d=bm[n].postEncodingTransform?bm[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:bm[n].vgMark,...o?{clip:!0}:{},...a?{style:a}:{},...l?{key:l.field}:{},...u?{sort:u}:{},...c||{},...f===!1?{aria:f}:{},from:{data:t.fromPrefix+e.requestDataName(yt.Main)},encode:{update:bm[n].encodeEntry(e)},...d?{transform:d}:{}}]}function Eme(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return t!=null&&t.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function Cme(e){const t=e.component.projection;return t&&!t.isFit?!0:void 0}function Sme(e){if(!e.component.selection)return null;const t=G(e.component.selection).length;let n=t,i=e.parent;for(;i&&n===0;)n=G(i.component.selection).length,i=i.parent;return n?{interactive:t>0||e.mark==="geoshape"||!!e.encoding.tooltip}:null}class fL extends iL{constructor(t,n,i,r={},s){super(t,"unit",n,i,s,void 0,ZN(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const o=us(t.mark)?{...t.mark}:{type:t.mark},a=o.type;o.filled===void 0&&(o.filled=fpe(o,s,{graticule:t.data&&rw(t.data)}));const l=this.encoding=bhe(t.encoding||{},a,o.filled,s);this.markDef=sO(o,l,s),this.size=nme({encoding:l,size:ZN(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=rO(this.markDef,l),this.specifiedScales=this.initScales(a,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(u=>V_(u))}get hasProjection(){const{encoding:t}=this,n=this.mark===QD,i=t&&_ce.some(r=>Se(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return y1.reduce((i,r)=>{const s=Ut(n[r]);return s&&(i[r]=this.initScale(s.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=li(t);return q(n)&&(r.domain=n.map($i)),q(i)&&(r.range=i.map($i)),r}initAxes(t){return as.reduce((n,i)=>{const r=t[i];if(Se(r)||i===wt&&Se(t.x2)||i===Zt&&Se(t.y2)){const s=Se(r)?r.axis:void 0;n[i]=s&&this.initAxis({...s})}return n},{})}initAxis(t){const n=G(t),i={};for(const r of n){const s=t[r];i[r]=Xd(s)?aD(s):$i(s)}return i}initLegends(t){return Fce.reduce((n,i)=>{const r=Ut(t[i]);if(r&&Nce(i)){const s=r.legend;n[i]=s&&li(s)}return n},{})}parseData(){this.component.data=ym(this)}parseLayoutSize(){P1e(this)}parseSelections(){this.component.selection=Mge(this,this.selection)}parseMarkGroup(){this.component.mark=_me(this)}parseAxesAndHeaders(){this.component.axes=X1e(this)}assembleSelectionTopLevelSignals(t){return Jpe(this,t)}assembleSignals(){return[...oR(this),...Zpe(this,[])]}assembleSelectionData(t){return Qpe(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return xw(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!xc(this.parent))&&(t=CO(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return t!==void 0?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return ml(this.encoding,t)}fieldDef(t){const n=this.encoding[t];return ds(n)}typedFieldDef(t){const n=this.fieldDef(t);return Un(n)?n:null}}class Uw extends Lw{constructor(t,n,i,r,s){super(t,"layer",n,i,s,t.resolve,t.view);const o={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,l)=>{if(G1(a))return new Uw(a,this,this.getName(`layer_${l}`),o,s);if(Xs(a))return new fL(a,this,this.getName(`layer_${l}`),o,s);throw new Error(s_(a))})}parseData(){this.component.data=ym(this);for(const t of this.children)t.parseData()}parseLayoutSize(){I1e(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of G(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){Z1e(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),oR(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),xw(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of ee(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return ege(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),TR(this))}}function qw(e,t,n,i,r){if(M1(e))return new sh(e,t,n,r);if(G1(e))return new Uw(e,t,n,i,r);if(Xs(e))return new fL(e,t,n,i,r);if(jhe(e))return new W1e(e,t,n,r);throw new Error(s_(e))}function Ame(e,t={}){t.logger&&Zfe(t.logger),t.fieldTitle&&_N(t.fieldTitle);try{const n=nO(Wl(t.config,e.config)),i=bO(e,n),r=qw(i,null,"",void 0,n);return r.parse(),J0e(r.component.data,r),{spec:Mme(r,Tme(e,i.autosize,n,r),e.datasets,e.usermeta),normalized:i}}finally{t.logger&&Kfe(),t.fieldTitle&&che()}}function Tme(e,t,n,i){const r=i.component.layoutSize.get("width"),s=i.component.layoutSize.get("height");if(t===void 0?(t={type:"pad"},i.hasAxisOrientSignalRef()&&(t.resize=!0)):te(t)&&(t={type:t}),r&&s&&Gpe(t.type)){if(r==="step"&&s==="step")Y(bD()),t.type="pad";else if(r==="step"||s==="step"){const o=r==="step"?"width":"height";Y(bD(m1(o)));const a=o==="width"?"height":"width";t.type=Vpe(a)}}return{...G(t).length===1&&t.type?t.type==="pad"?{}:{autosize:t.type}:{autosize:t},...xO(n,!1),...xO(e,!0)}}function Mme(e,t,n={},i){const r=e.config?Qhe(e.config):void 0,s=[].concat(e.assembleSelectionData([]),N1e(e.component.data,n)),o=e.assembleProjections(),a=e.assembleTitle(),l=e.assembleGroupStyle(),u=e.assembleGroupEncodeEntry(!0);let c=e.assembleLayoutSignals();c=c.filter(h=>(h.name==="width"||h.name==="height")&&h.value!==void 0?(t[h.name]=+h.value,!1):!0);const{params:f,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...a?{title:a}:{},...l?{style:l}:{},...u?{encode:{update:u}}:{},data:s,...o.length>0?{projections:o}:{},...e.assembleGroup([...c,...e.assembleSelectionTopLevelSignals([]),...XN(f)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const Fme=gce.version,Dme=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:Zu,accessPathWithDatum:V7,compile:Ame,contains:Pe,deepEqual:ki,deleteNestedProperty:u1,duplicate:Ce,entries:Wo,every:q7,fieldIntersection:G7,flatAccessWithDatum:PF,getFirstDefined:Dt,hasIntersection:W7,hash:ze,internalField:UF,isBoolean:Nd,isEmpty:lt,isEqual:yce,isInternalField:qF,isNullOrFalse:U7,isNumeric:c1,keys:G,logicalExpr:Od,mergeDeep:IF,never:LF,normalize:bO,normalizeAngle:Ld,omit:ri,pick:Yu,prefixGenerator:H7,removePathFromField:X7,replaceAll:il,replacePathInField:ji,resetIdCounter:vce,setEqual:zF,some:nl,stringify:ut,titleCase:Rd,unique:ns,uniqueId:jF,vals:ln,varName:_t,version:Fme},Symbol.toStringTag,{value:"Module"}));function dL(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var Nme="vega-themes",Ome="2.14.0",Rme="Themes for stylized Vega and Vega-Lite visualizations.",Lme=["vega","vega-lite","themes","style"],Ime="BSD-3-Clause",zme={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},Pme=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],Bme="build/vega-themes.js",jme="build/vega-themes.module.js",Ume="build/vega-themes.min.js",qme="build/vega-themes.min.js",Wme="build/vega-themes.module.d.ts",Hme={type:"git",url:"https://github.com/vega/vega-themes.git"},Gme=["src","build"],Vme={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",format:"eslint . --fix",lint:"eslint .",release:"release-it"},Xme={"@babel/core":"^7.22.9","@babel/plugin-proposal-async-generator-functions":"^7.20.7","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-proposal-optional-catch-binding":"^7.18.6","@babel/plugin-transform-runtime":"^7.22.9","@babel/preset-env":"^7.22.9","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-terser":"^0.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","browser-sync":"^2.29.3",concurrently:"^8.2.0",eslint:"^8.45.0","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^5.0.0","gh-pages":"^5.0.0",prettier:"^3.0.0","release-it":"^16.1.0",rollup:"^3.26.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",typescript:"^5.1.6",vega:"^5.25.0","vega-lite":"^5.9.3"},Yme={vega:"*","vega-lite":"*"},Zme={},Kme={name:Nme,version:Ome,description:Rme,keywords:Lme,license:Ime,author:zme,contributors:Pme,main:Bme,module:jme,unpkg:Ume,jsdelivr:qme,types:Wme,repository:Hme,files:Gme,scripts:Vme,devDependencies:Xme,peerDependencies:Yme,dependencies:Zme};const wc="#fff",hL="#888",Jme={background:"#333",view:{stroke:hL},title:{color:wc,subtitleColor:wc},style:{"guide-label":{fill:wc},"guide-title":{fill:wc}},axis:{domainColor:wc,gridColor:hL,tickColor:wc}},$l="#4572a7",Qme={background:"#fff",arc:{fill:$l},area:{fill:$l},line:{stroke:$l,strokeWidth:2},path:{stroke:$l},rect:{fill:$l},shape:{stroke:$l},symbol:{fill:$l,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},El="#30a2da",Ww="#cbcbcb",e2e="#999",t2e="#333",pL="#f0f0f0",gL="#333",n2e={arc:{fill:El},area:{fill:El},axis:{domainColor:Ww,grid:!0,gridColor:Ww,gridWidth:1,labelColor:e2e,labelFontSize:10,titleColor:t2e,tickColor:Ww,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:pL,group:{fill:pL},legend:{labelColor:gL,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:gL,titleFontSize:14,titlePadding:10},line:{stroke:El,strokeWidth:2},path:{stroke:El,strokeWidth:.5},rect:{fill:El},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:El},bar:{binSpacing:2,fill:El,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Cl="#000",i2e={group:{fill:"#e5e5e5"},arc:{fill:Cl},area:{fill:Cl},line:{stroke:Cl},path:{stroke:Cl},rect:{fill:Cl},shape:{stroke:Cl},symbol:{fill:Cl,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},r2e=22,s2e="normal",mL="Benton Gothic, sans-serif",yL=11.5,o2e="normal",Sl="#82c6df",Hw="Benton Gothic Bold, sans-serif",bL="normal",vL=13,oh={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},a2e={background:"#ffffff",title:{anchor:"start",color:"#000000",font:Hw,fontSize:r2e,fontWeight:s2e},arc:{fill:Sl},area:{fill:Sl},line:{stroke:Sl,strokeWidth:2},path:{stroke:Sl},rect:{fill:Sl},shape:{stroke:Sl},symbol:{fill:Sl,size:30},axis:{labelFont:mL,labelFontSize:yL,labelFontWeight:o2e,titleFont:Hw,titleFontSize:vL,titleFontWeight:bL},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:mL,labelFontSize:yL,symbolType:"square",titleFont:Hw,titleFontSize:vL,titleFontWeight:bL},range:{category:oh["category-6"],diverging:oh["fireandice-6"],heatmap:oh["fire-7"],ordinal:oh["fire-7"],ramp:oh["fire-7"]}},Al="#ab5787",vm="#979797",l2e={background:"#f9f9f9",arc:{fill:Al},area:{fill:Al},line:{stroke:Al},path:{stroke:Al},rect:{fill:Al},shape:{stroke:Al},symbol:{fill:Al,size:30},axis:{domainColor:vm,domainWidth:.5,gridWidth:.2,labelColor:vm,tickColor:vm,tickWidth:.2,titleColor:vm},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Tl="#3e5c69",u2e={background:"#fff",arc:{fill:Tl},area:{fill:Tl},line:{stroke:Tl},path:{stroke:Tl},rect:{fill:Tl},shape:{stroke:Tl},symbol:{fill:Tl},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Gi="#1696d2",xL="#000000",c2e="#FFFFFF",xm="Lato",Gw="Lato",f2e="Lato",d2e="#DEDDDD",h2e=18,ah={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},p2e={background:c2e,title:{anchor:"start",fontSize:h2e,font:xm},axisX:{domain:!0,domainColor:xL,domainWidth:1,grid:!1,labelFontSize:12,labelFont:Gw,labelAngle:0,tickColor:xL,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:xm},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:d2e,gridWidth:1,labelFontSize:12,labelFont:Gw,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:xm,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:Gw,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:xm,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:ah["six-groups-cat-1"],diverging:ah["diverging-colors"],heatmap:ah["diverging-colors"],ordinal:ah["six-groups-seq"],ramp:ah["shades-blue"]},area:{fill:Gi},rect:{fill:Gi},line:{color:Gi,stroke:Gi,strokeWidth:5},trail:{color:Gi,stroke:Gi,strokeWidth:0,size:1},path:{stroke:Gi,strokeWidth:.5},point:{filled:!0},text:{font:f2e,color:Gi,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Gi,stroke:null}},arc:{fill:Gi},shape:{stroke:Gi},symbol:{fill:Gi,size:30}},Ml="#3366CC",_L="#ccc",_m="Arial, sans-serif",g2e={arc:{fill:Ml},area:{fill:Ml},path:{stroke:Ml},rect:{fill:Ml},shape:{stroke:Ml},symbol:{stroke:Ml},circle:{fill:Ml},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:_m,fontSize:12},"guide-title":{font:_m,fontSize:12},"group-title":{font:_m,fontSize:12}},title:{font:_m,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:_L,tickColor:_L,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},Vw=e=>e*(1/3+1),wL=Vw(9),kL=Vw(10),$L=Vw(12),lh="Segoe UI",EL="wf_standard-font, helvetica, arial, sans-serif",CL="#252423",uh="#605E5C",SL="transparent",m2e="#C8C6C4",Sr="#118DFF",y2e="#12239E",b2e="#E66C37",v2e="#6B007B",x2e="#E044A7",_2e="#744EC2",w2e="#D9B300",k2e="#D64550",AL=Sr,TL="#DEEFFF",ML=[TL,AL],$2e={view:{stroke:SL},background:SL,font:lh,header:{titleFont:EL,titleFontSize:$L,titleColor:CL,labelFont:lh,labelFontSize:kL,labelColor:uh},axis:{ticks:!1,grid:!1,domain:!1,labelColor:uh,labelFontSize:wL,titleFont:EL,titleColor:CL,titleFontSize:$L,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:m2e,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:Sr},line:{stroke:Sr,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:lh,fontSize:wL,fill:uh},arc:{fill:Sr},area:{fill:Sr,line:!0,opacity:.6},path:{stroke:Sr},rect:{fill:Sr},point:{fill:Sr,filled:!0,size:75},shape:{stroke:Sr},symbol:{fill:Sr,strokeWidth:1.5,size:50},legend:{titleFont:lh,titleFontWeight:"bold",titleColor:uh,labelFont:lh,labelFontSize:kL,labelColor:uh,symbolType:"circle",symbolSize:75},range:{category:[Sr,y2e,b2e,v2e,x2e,_2e,w2e,k2e],diverging:ML,heatmap:ML,ordinal:[TL,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",AL]}},Xw='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',FL=400,E2e=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],C2e=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function wm({type:e,background:t}){const n=e==="dark"?"#161616":"#ffffff",i=e==="dark"?"#f4f4f4":"#161616",r=e==="dark"?E2e:C2e,s=e==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:s},area:{fill:s},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{stroke:s},circle:{fill:s},view:{fill:n,stroke:n},group:{fill:n},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:Xw,fontWeight:600},axis:{labelColor:i,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:i,labelAngle:0},style:{"guide-label":{font:Xw,fill:i,fontWeight:FL},"guide-title":{font:Xw,fill:i,fontWeight:FL}},range:{category:r,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const S2e=wm({type:"light",background:"#ffffff"}),A2e=wm({type:"light",background:"#f4f4f4"}),T2e=wm({type:"dark",background:"#262626"}),M2e=wm({type:"dark",background:"#161616"}),F2e=Kme.version,D2e=Object.freeze(Object.defineProperty({__proto__:null,carbong10:A2e,carbong100:M2e,carbong90:T2e,carbonwhite:S2e,dark:Jme,excel:Qme,fivethirtyeight:n2e,ggplot2:i2e,googlecharts:g2e,latimes:a2e,powerbi:$2e,quartz:l2e,urbaninstitute:p2e,version:F2e,vox:u2e},Symbol.toStringTag,{value:"Module"}));function N2e(e,t,n,i){if(q(e))return`[${e.map(r=>t(te(r)?r:DL(r,n))).join(", ")}]`;if(ie(e)){let r="";const{title:s,image:o,...a}=e;s&&(r+=`<h2>${t(s)}</h2>`),o&&(r+=`<img src="${new URL(t(o),i||location.href).href}">`);const l=Object.keys(a);if(l.length>0){r+="<table>";for(const u of l){let c=a[u];c!==void 0&&(ie(c)&&(c=DL(c,n)),r+=`<tr><td class="key">${t(u)}</td><td class="value">${t(c)}</td></tr>`)}r+="</table>"}return r||"{}"}return t(e)}function O2e(e){const t=[];return function(n,i){if(typeof i!="object"||i===null)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}function DL(e,t){return JSON.stringify(e,O2e(t))}var R2e=`#vg-tooltip-element {
|
|
74
|
+
visibility: hidden;
|
|
75
|
+
padding: 8px;
|
|
76
|
+
position: fixed;
|
|
77
|
+
z-index: 1000;
|
|
78
|
+
font-family: sans-serif;
|
|
79
|
+
font-size: 11px;
|
|
80
|
+
border-radius: 3px;
|
|
81
|
+
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
|
|
82
|
+
/* The default theme is the light theme. */
|
|
83
|
+
background-color: rgba(255, 255, 255, 0.95);
|
|
84
|
+
border: 1px solid #d9d9d9;
|
|
85
|
+
color: black;
|
|
86
|
+
}
|
|
87
|
+
#vg-tooltip-element.visible {
|
|
88
|
+
visibility: visible;
|
|
89
|
+
}
|
|
90
|
+
#vg-tooltip-element h2 {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
margin-bottom: 10px;
|
|
93
|
+
font-size: 13px;
|
|
94
|
+
}
|
|
95
|
+
#vg-tooltip-element table {
|
|
96
|
+
border-spacing: 0;
|
|
97
|
+
}
|
|
98
|
+
#vg-tooltip-element table tr {
|
|
99
|
+
border: none;
|
|
100
|
+
}
|
|
101
|
+
#vg-tooltip-element table tr td {
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
padding-top: 2px;
|
|
105
|
+
padding-bottom: 2px;
|
|
106
|
+
}
|
|
107
|
+
#vg-tooltip-element table tr td.key {
|
|
108
|
+
color: #808080;
|
|
109
|
+
max-width: 150px;
|
|
110
|
+
text-align: right;
|
|
111
|
+
padding-right: 4px;
|
|
112
|
+
}
|
|
113
|
+
#vg-tooltip-element table tr td.value {
|
|
114
|
+
display: block;
|
|
115
|
+
max-width: 300px;
|
|
116
|
+
max-height: 7em;
|
|
117
|
+
text-align: left;
|
|
118
|
+
}
|
|
119
|
+
#vg-tooltip-element.dark-theme {
|
|
120
|
+
background-color: rgba(32, 32, 32, 0.9);
|
|
121
|
+
border: 1px solid #f5f5f5;
|
|
122
|
+
color: white;
|
|
123
|
+
}
|
|
124
|
+
#vg-tooltip-element.dark-theme td.key {
|
|
125
|
+
color: #bfbfbf;
|
|
126
|
+
}
|
|
127
|
+
`;const NL="vg-tooltip-element",L2e={offsetX:10,offsetY:10,id:NL,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:I2e,maxDepth:2,formatTooltip:N2e,baseURL:""};function I2e(e){return String(e).replace(/&/g,"&").replace(/</g,"<")}function z2e(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return R2e.toString().replace(NL,e)}function P2e(e,t,n,i){let r=e.clientX+n;r+t.width>window.innerWidth&&(r=+e.clientX-n-t.width);let s=e.clientY+i;return s+t.height>window.innerHeight&&(s=+e.clientY-i-t.height),{x:r,y:s}}class B2e{constructor(t){this.options={...L2e,...t};const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=z2e(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:s,y:o}=P2e(n,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${o}px`,this.el.style.left=`${s}px`}}function j2e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yw,OL;function U2e(){return OL||(OL=1,Yw=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Yw}var q2e=Qe;Qe.Node=Fl,Qe.create=Qe;function Qe(e){var t=this;if(t instanceof Qe||(t=new Qe),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(r){t.push(r)});else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}Qe.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Qe.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Qe.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Qe.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)H2e(this,arguments[e]);return this.length},Qe.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)G2e(this,arguments[e]);return this.length},Qe.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Qe.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Qe.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++)e.call(t,n.value,i,this),n=n.next},Qe.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--)e.call(t,n.value,i,this),n=n.prev},Qe.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value},Qe.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value},Qe.prototype.map=function(e,t){t=t||this;for(var n=new Qe,i=this.head;i!==null;)n.push(e.call(t,i.value,this)),i=i.next;return n},Qe.prototype.mapReverse=function(e,t){t=t||this;for(var n=new Qe,i=this.tail;i!==null;)n.push(e.call(t,i.value,this)),i=i.prev;return n},Qe.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else if(this.head)i=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=0;i!==null;r++)n=e(n,i.value,r),i=i.next;return n},Qe.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else if(this.tail)i=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;i!==null;r--)n=e(n,i.value,r),i=i.prev;return n},Qe.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e},Qe.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e},Qe.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new Qe;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,r=this.head;r!==null&&i<e;i++)r=r.next;for(;r!==null&&i<t;i++,r=r.next)n.push(r.value);return n},Qe.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new Qe;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,r=this.tail;r!==null&&i>t;i--)r=r.prev;for(;r!==null&&i>e;i--,r=r.prev)n.push(r.value);return n},Qe.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,r=this.head;r!==null&&i<e;i++)r=r.next;for(var s=[],i=0;r&&i<t;i++)s.push(r.value),r=this.removeNode(r);r===null&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(var i=0;i<n.length;i++)r=W2e(this,r,n[i]);return s},Qe.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this};function W2e(e,t,n){var i=t===e.head?new Fl(n,null,t,e):new Fl(n,t,t.next,e);return i.next===null&&(e.tail=i),i.prev===null&&(e.head=i),e.length++,i}function H2e(e,t){e.tail=new Fl(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function G2e(e,t){e.head=new Fl(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Fl(e,t,n,i){if(!(this instanceof Fl))return new Fl(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{U2e()(Qe)}catch{}const V2e=q2e,Dl=Symbol("max"),Qs=Symbol("length"),kc=Symbol("lengthCalculator"),ch=Symbol("allowStale"),Nl=Symbol("maxAge"),eo=Symbol("dispose"),RL=Symbol("noDisposeOnSet"),tn=Symbol("lruList"),Ar=Symbol("cache"),LL=Symbol("updateAgeOnGet"),Zw=()=>1;class X2e{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[Dl]=t.max||1/0;const n=t.length||Zw;if(this[kc]=typeof n!="function"?Zw:n,this[ch]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Nl]=t.maxAge||0,this[eo]=t.dispose,this[RL]=t.noDisposeOnSet||!1,this[LL]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[Dl]=t||1/0,fh(this)}get max(){return this[Dl]}set allowStale(t){this[ch]=!!t}get allowStale(){return this[ch]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Nl]=t,fh(this)}get maxAge(){return this[Nl]}set lengthCalculator(t){typeof t!="function"&&(t=Zw),t!==this[kc]&&(this[kc]=t,this[Qs]=0,this[tn].forEach(n=>{n.length=this[kc](n.value,n.key),this[Qs]+=n.length})),fh(this)}get lengthCalculator(){return this[kc]}get length(){return this[Qs]}get itemCount(){return this[tn].length}rforEach(t,n){n=n||this;for(let i=this[tn].tail;i!==null;){const r=i.prev;IL(this,t,i,n),i=r}}forEach(t,n){n=n||this;for(let i=this[tn].head;i!==null;){const r=i.next;IL(this,t,i,n),i=r}}keys(){return this[tn].toArray().map(t=>t.key)}values(){return this[tn].toArray().map(t=>t.value)}reset(){this[eo]&&this[tn]&&this[tn].length&&this[tn].forEach(t=>this[eo](t.key,t.value)),this[Ar]=new Map,this[tn]=new V2e,this[Qs]=0}dump(){return this[tn].map(t=>km(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[tn]}set(t,n,i){if(i=i||this[Nl],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const r=i?Date.now():0,s=this[kc](n,t);if(this[Ar].has(t)){if(s>this[Dl])return $c(this,this[Ar].get(t)),!1;const l=this[Ar].get(t).value;return this[eo]&&(this[RL]||this[eo](t,l.value)),l.now=r,l.maxAge=i,l.value=n,this[Qs]+=s-l.length,l.length=s,this.get(t),fh(this),!0}const o=new Y2e(t,n,s,r,i);return o.length>this[Dl]?(this[eo]&&this[eo](t,n),!1):(this[Qs]+=o.length,this[tn].unshift(o),this[Ar].set(t,this[tn].head),fh(this),!0)}has(t){if(!this[Ar].has(t))return!1;const n=this[Ar].get(t).value;return!km(this,n)}get(t){return Kw(this,t,!0)}peek(t){return Kw(this,t,!1)}pop(){const t=this[tn].tail;return t?($c(this,t),t.value):null}del(t){$c(this,this[Ar].get(t))}load(t){this.reset();const n=Date.now();for(let i=t.length-1;i>=0;i--){const r=t[i],s=r.e||0;if(s===0)this.set(r.k,r.v);else{const o=s-n;o>0&&this.set(r.k,r.v,o)}}}prune(){this[Ar].forEach((t,n)=>Kw(this,n,!1))}}const Kw=(e,t,n)=>{const i=e[Ar].get(t);if(i){const r=i.value;if(km(e,r)){if($c(e,i),!e[ch])return}else n&&(e[LL]&&(i.value.now=Date.now()),e[tn].unshiftNode(i));return r.value}},km=(e,t)=>{if(!t||!t.maxAge&&!e[Nl])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[Nl]&&n>e[Nl]},fh=e=>{if(e[Qs]>e[Dl])for(let t=e[tn].tail;e[Qs]>e[Dl]&&t!==null;){const n=t.prev;$c(e,t),t=n}},$c=(e,t)=>{if(t){const n=t.value;e[eo]&&e[eo](n.key,n.value),e[Qs]-=n.length,e[Ar].delete(n.key),e[tn].removeNode(t)}};class Y2e{constructor(t,n,i,r,s){this.key=t,this.value=n,this.length=i,this.now=r,this.maxAge=s||0}}const IL=(e,t,n,i)=>{let r=n.value;km(e,r)&&($c(e,n),e[ch]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};var Z2e=X2e;const K2e=Object.freeze({loose:!0}),J2e=Object.freeze({});var Jw=e=>e?typeof e!="object"?K2e:e:J2e,Qw={exports:{}};const Q2e="2.0.0",zL=256,eye=Number.MAX_SAFE_INTEGER||9007199254740991,tye=16,nye=zL-6;var e5={MAX_LENGTH:zL,MAX_SAFE_COMPONENT_LENGTH:tye,MAX_SAFE_BUILD_LENGTH:nye,MAX_SAFE_INTEGER:eye,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:Q2e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},$m=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=e5,s=$m;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.t={};let c=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[f,i]],h=g=>{for(const[m,y]of d)g=g.split(`${m}*`).join(`${m}{0,${y}}`).split(`${m}+`).join(`${m}{1,${y}}`);return g},p=(g,m,y)=>{const b=h(m),v=c++;s(g,v,m),u[g]=v,l[v]=m,o[v]=new RegExp(m,y?"g":void 0),a[v]=new RegExp(b,y?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Qw,Qw.exports);var t5=Qw.exports;const PL=/^[0-9]+$/,BL=(e,t)=>{const n=PL.test(e),i=PL.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1};var iye={compareIdentifiers:BL,rcompareIdentifiers:(e,t)=>BL(t,e)};const Em=$m,{MAX_LENGTH:jL,MAX_SAFE_INTEGER:Cm}=e5,{safeRe:UL,t:qL}=t5,rye=Jw,{compareIdentifiers:Ec}=iye;var n5=class ys{constructor(t,n){if(n=rye(n),t instanceof ys){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>jL)throw new TypeError(`version is longer than ${jL} characters`);Em("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const i=t.trim().match(n.loose?UL[qL.LOOSE]:UL[qL.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Cm||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Cm||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Cm||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){const s=+r;if(s>=0&&s<Cm)return s}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Em("SemVer.compare",this.version,this.options,t),!(t instanceof ys)){if(typeof t=="string"&&t===this.version)return 0;t=new ys(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ys||(t=new ys(t,this.options)),Ec(this.major,t.major)||Ec(this.minor,t.minor)||Ec(this.patch,t.patch)}comparePre(t){if(t instanceof ys||(t=new ys(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const i=this.prerelease[n],r=t.prerelease[n];if(Em("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Ec(i,r)}while(++n)}compareBuild(t){t instanceof ys||(t=new ys(t,this.options));let n=0;do{const i=this.build[n],r=t.build[n];if(Em("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Ec(i,r)}while(++n)}inc(t,n,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const r=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[r];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let s=[n,r];i===!1&&(s=[n]),Ec(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const WL=n5;var Cc=(e,t,n)=>new WL(e,n).compare(new WL(t,n));const sye=Cc;var oye=(e,t,n)=>sye(e,t,n)===0;const aye=Cc;var lye=(e,t,n)=>aye(e,t,n)!==0;const uye=Cc;var cye=(e,t,n)=>uye(e,t,n)>0;const fye=Cc;var dye=(e,t,n)=>fye(e,t,n)>=0;const hye=Cc;var pye=(e,t,n)=>hye(e,t,n)<0;const gye=Cc;var mye=(e,t,n)=>gye(e,t,n)<=0;const yye=oye,bye=lye,vye=cye,xye=dye,_ye=pye,wye=mye;var kye=(e,t,n,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return yye(e,n,i);case"!=":return bye(e,n,i);case">":return vye(e,n,i);case">=":return xye(e,n,i);case"<":return _ye(e,n,i);case"<=":return wye(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}},i5,HL;function $ye(){if(HL)return i5;HL=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,f){if(f=n(f),c instanceof t){if(c.loose===!!f.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,f),this.options=f,this.loose=!!f.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const f=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],d=c.match(f);if(!d)throw new TypeError(`Invalid comparator: ${c}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new a(d[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return s(c,this.operator,this.semver,this.options)}intersects(c,f){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(c.value,f).test(this.value):c.operator===""?c.value===""?!0:new l(this.value,f).test(c.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||s(this.semver,"<",c.semver,f)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||s(this.semver,">",c.semver,f)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}i5=t;const n=Jw,{safeRe:i,t:r}=t5,s=kye,o=$m,a=n5,l=VL();return i5}var r5,GL;function VL(){if(GL)return r5;GL=1;class e{constructor(M,T){if(T=i(T),M instanceof e)return M.loose===!!T.loose&&M.includePrerelease===!!T.includePrerelease?M:new e(M.raw,T);if(M instanceof r)return this.raw=M.value,this.set=[[M]],this.format(),this;if(this.options=T,this.loose=!!T.loose,this.includePrerelease=!!T.includePrerelease,this.raw=M.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(O=>this.parseRange(O.trim())).filter(O=>O.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const O=this.set[0];if(this.set=this.set.filter(P=>!p(P[0])),this.set.length===0)this.set=[O];else if(this.set.length>1){for(const P of this.set)if(P.length===1&&g(P[0])){this.set=[P];break}}}this.format()}format(){return this.range=this.set.map(M=>M.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(M){const O=((this.options.includePrerelease&&d)|(this.options.loose&&h))+":"+M,P=n.get(O);if(P)return P;const j=this.options.loose,W=j?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];M=M.replace(W,A(this.options.includePrerelease)),s("hyphen replace",M),M=M.replace(a[l.COMPARATORTRIM],u),s("comparator trim",M),M=M.replace(a[l.TILDETRIM],c),s("tilde trim",M),M=M.replace(a[l.CARETTRIM],f),s("caret trim",M);let ne=M.split(" ").map(Le=>y(Le,this.options)).join(" ").split(/\s+/).map(Le=>E(Le,this.options));j&&(ne=ne.filter(Le=>(s("loose invalid filter",Le,this.options),!!Le.match(a[l.COMPARATORLOOSE])))),s("range list",ne);const ae=new Map,ke=ne.map(Le=>new r(Le,this.options));for(const Le of ke){if(p(Le))return[Le];ae.set(Le.value,Le)}ae.size>1&&ae.has("")&&ae.delete("");const Ie=[...ae.values()];return n.set(O,Ie),Ie}intersects(M,T){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(O=>m(O,T)&&M.set.some(P=>m(P,T)&&O.every(j=>P.every(W=>j.intersects(W,T)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new o(M,this.options)}catch{return!1}for(let T=0;T<this.set.length;T++)if(R(this.set[T],M,this.options))return!0;return!1}}r5=e;const t=Z2e,n=new t({max:1e3}),i=Jw,r=$ye(),s=$m,o=n5,{safeRe:a,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:f}=t5,{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:h}=e5,p=C=>C.value==="<0.0.0-0",g=C=>C.value==="",m=(C,M)=>{let T=!0;const O=C.slice();let P=O.pop();for(;T&&O.length;)T=O.every(j=>P.intersects(j,M)),P=O.pop();return T},y=(C,M)=>(s("comp",C,M),C=_(C,M),s("caret",C),C=v(C,M),s("tildes",C),C=w(C,M),s("xrange",C),C=S(C,M),s("stars",C),C),b=C=>!C||C.toLowerCase()==="x"||C==="*",v=(C,M)=>C.trim().split(/\s+/).map(T=>x(T,M)).join(" "),x=(C,M)=>{const T=M.loose?a[l.TILDELOOSE]:a[l.TILDE];return C.replace(T,(O,P,j,W,ne)=>{s("tilde",C,O,P,j,W,ne);let ae;return b(P)?ae="":b(j)?ae=`>=${P}.0.0 <${+P+1}.0.0-0`:b(W)?ae=`>=${P}.${j}.0 <${P}.${+j+1}.0-0`:ne?(s("replaceTilde pr",ne),ae=`>=${P}.${j}.${W}-${ne} <${P}.${+j+1}.0-0`):ae=`>=${P}.${j}.${W} <${P}.${+j+1}.0-0`,s("tilde return",ae),ae})},_=(C,M)=>C.trim().split(/\s+/).map(T=>k(T,M)).join(" "),k=(C,M)=>{s("caret",C,M);const T=M.loose?a[l.CARETLOOSE]:a[l.CARET],O=M.includePrerelease?"-0":"";return C.replace(T,(P,j,W,ne,ae)=>{s("caret",C,P,j,W,ne,ae);let ke;return b(j)?ke="":b(W)?ke=`>=${j}.0.0${O} <${+j+1}.0.0-0`:b(ne)?j==="0"?ke=`>=${j}.${W}.0${O} <${j}.${+W+1}.0-0`:ke=`>=${j}.${W}.0${O} <${+j+1}.0.0-0`:ae?(s("replaceCaret pr",ae),j==="0"?W==="0"?ke=`>=${j}.${W}.${ne}-${ae} <${j}.${W}.${+ne+1}-0`:ke=`>=${j}.${W}.${ne}-${ae} <${j}.${+W+1}.0-0`:ke=`>=${j}.${W}.${ne}-${ae} <${+j+1}.0.0-0`):(s("no pr"),j==="0"?W==="0"?ke=`>=${j}.${W}.${ne}${O} <${j}.${W}.${+ne+1}-0`:ke=`>=${j}.${W}.${ne}${O} <${j}.${+W+1}.0-0`:ke=`>=${j}.${W}.${ne} <${+j+1}.0.0-0`),s("caret return",ke),ke})},w=(C,M)=>(s("replaceXRanges",C,M),C.split(/\s+/).map(T=>$(T,M)).join(" ")),$=(C,M)=>{C=C.trim();const T=M.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return C.replace(T,(O,P,j,W,ne,ae)=>{s("xRange",C,O,P,j,W,ne,ae);const ke=b(j),Ie=ke||b(W),Le=Ie||b(ne),We=Le;return P==="="&&We&&(P=""),ae=M.includePrerelease?"-0":"",ke?P===">"||P==="<"?O="<0.0.0-0":O="*":P&&We?(Ie&&(W=0),ne=0,P===">"?(P=">=",Ie?(j=+j+1,W=0,ne=0):(W=+W+1,ne=0)):P==="<="&&(P="<",Ie?j=+j+1:W=+W+1),P==="<"&&(ae="-0"),O=`${P+j}.${W}.${ne}${ae}`):Ie?O=`>=${j}.0.0${ae} <${+j+1}.0.0-0`:Le&&(O=`>=${j}.${W}.0${ae} <${j}.${+W+1}.0-0`),s("xRange return",O),O})},S=(C,M)=>(s("replaceStars",C,M),C.trim().replace(a[l.STAR],"")),E=(C,M)=>(s("replaceGTE0",C,M),C.trim().replace(a[M.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=C=>(M,T,O,P,j,W,ne,ae,ke,Ie,Le,We,Wn)=>(b(O)?T="":b(P)?T=`>=${O}.0.0${C?"-0":""}`:b(j)?T=`>=${O}.${P}.0${C?"-0":""}`:W?T=`>=${T}`:T=`>=${T}${C?"-0":""}`,b(ke)?ae="":b(Ie)?ae=`<${+ke+1}.0.0-0`:b(Le)?ae=`<${ke}.${+Ie+1}.0-0`:We?ae=`<=${ke}.${Ie}.${Le}-${We}`:C?ae=`<${ke}.${Ie}.${+Le+1}-0`:ae=`<=${ae}`,`${T} ${ae}`.trim()),R=(C,M,T)=>{for(let O=0;O<C.length;O++)if(!C[O].test(M))return!1;if(M.prerelease.length&&!T.includePrerelease){for(let O=0;O<C.length;O++)if(s(C[O].semver),C[O].semver!==r.ANY&&C[O].semver.prerelease.length>0){const P=C[O].semver;if(P.major===M.major&&P.minor===M.minor&&P.patch===M.patch)return!0}return!1}return!0};return r5}const Eye=VL();var Cye=(e,t,n)=>{try{t=new Eye(t,n)}catch{return!1}return t.test(e)},XL=j2e(Cye);function Sye(e,t,n){const i=e.open(t),r=1e4,s=250,{origin:o}=new URL(t);let a=~~(r/s);function l(c){c.source===i&&(a=0,e.removeEventListener("message",l,!1))}e.addEventListener("message",l,!1);function u(){a<=0||(i.postMessage(n,o),setTimeout(u,s),a-=1)}setTimeout(u,s)}var Aye=`.vega-embed {
|
|
128
|
+
position: relative;
|
|
129
|
+
display: inline-block;
|
|
130
|
+
box-sizing: border-box;
|
|
131
|
+
}
|
|
132
|
+
.vega-embed.has-actions {
|
|
133
|
+
padding-right: 38px;
|
|
134
|
+
}
|
|
135
|
+
.vega-embed details:not([open]) > :not(summary) {
|
|
136
|
+
display: none !important;
|
|
137
|
+
}
|
|
138
|
+
.vega-embed summary {
|
|
139
|
+
list-style: none;
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 0;
|
|
142
|
+
right: 0;
|
|
143
|
+
padding: 6px;
|
|
144
|
+
z-index: 1000;
|
|
145
|
+
background: white;
|
|
146
|
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
|
147
|
+
color: #1b1e23;
|
|
148
|
+
border: 1px solid #aaa;
|
|
149
|
+
border-radius: 999px;
|
|
150
|
+
opacity: 0.2;
|
|
151
|
+
transition: opacity 0.4s ease-in;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
line-height: 0px;
|
|
154
|
+
}
|
|
155
|
+
.vega-embed summary::-webkit-details-marker {
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
.vega-embed summary:active {
|
|
159
|
+
box-shadow: #aaa 0px 0px 0px 1px inset;
|
|
160
|
+
}
|
|
161
|
+
.vega-embed summary svg {
|
|
162
|
+
width: 14px;
|
|
163
|
+
height: 14px;
|
|
164
|
+
}
|
|
165
|
+
.vega-embed details[open] summary {
|
|
166
|
+
opacity: 0.7;
|
|
167
|
+
}
|
|
168
|
+
.vega-embed:hover summary, .vega-embed:focus-within summary {
|
|
169
|
+
opacity: 1 !important;
|
|
170
|
+
transition: opacity 0.2s ease;
|
|
171
|
+
}
|
|
172
|
+
.vega-embed .vega-actions {
|
|
173
|
+
position: absolute;
|
|
174
|
+
z-index: 1001;
|
|
175
|
+
top: 35px;
|
|
176
|
+
right: -9px;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
padding-bottom: 8px;
|
|
180
|
+
padding-top: 8px;
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
|
|
183
|
+
border: 1px solid #d9d9d9;
|
|
184
|
+
background: white;
|
|
185
|
+
animation-duration: 0.15s;
|
|
186
|
+
animation-name: scale-in;
|
|
187
|
+
animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
|
|
188
|
+
text-align: left;
|
|
189
|
+
}
|
|
190
|
+
.vega-embed .vega-actions a {
|
|
191
|
+
padding: 8px 16px;
|
|
192
|
+
font-family: sans-serif;
|
|
193
|
+
font-size: 14px;
|
|
194
|
+
font-weight: 600;
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
color: #434a56;
|
|
197
|
+
text-decoration: none;
|
|
198
|
+
}
|
|
199
|
+
.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
|
|
200
|
+
background-color: #f7f7f9;
|
|
201
|
+
color: black;
|
|
202
|
+
}
|
|
203
|
+
.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
|
|
204
|
+
content: "";
|
|
205
|
+
display: inline-block;
|
|
206
|
+
position: absolute;
|
|
207
|
+
}
|
|
208
|
+
.vega-embed .vega-actions::before {
|
|
209
|
+
left: auto;
|
|
210
|
+
right: 14px;
|
|
211
|
+
top: -16px;
|
|
212
|
+
border: 8px solid rgba(0, 0, 0, 0);
|
|
213
|
+
border-bottom-color: #d9d9d9;
|
|
214
|
+
}
|
|
215
|
+
.vega-embed .vega-actions::after {
|
|
216
|
+
left: auto;
|
|
217
|
+
right: 15px;
|
|
218
|
+
top: -14px;
|
|
219
|
+
border: 7px solid rgba(0, 0, 0, 0);
|
|
220
|
+
border-bottom-color: #fff;
|
|
221
|
+
}
|
|
222
|
+
.vega-embed .chart-wrapper.fit-x {
|
|
223
|
+
width: 100%;
|
|
224
|
+
}
|
|
225
|
+
.vega-embed .chart-wrapper.fit-y {
|
|
226
|
+
height: 100%;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.vega-embed-wrapper {
|
|
230
|
+
max-width: 100%;
|
|
231
|
+
overflow: auto;
|
|
232
|
+
padding-right: 14px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@keyframes scale-in {
|
|
236
|
+
from {
|
|
237
|
+
opacity: 0;
|
|
238
|
+
transform: scale(0.6);
|
|
239
|
+
}
|
|
240
|
+
to {
|
|
241
|
+
opacity: 1;
|
|
242
|
+
transform: scale(1);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
`;function YL(e,...t){for(const n of t)Tye(e,n);return e}function Tye(e,t){for(const n of Object.keys(t))Hl(e,n,t[n],!0)}const Tr=rce;let dh=Dme;const Sm=typeof window<"u"?window:void 0;dh===void 0&&((sz=Sm==null?void 0:Sm.vl)!=null&&sz.compile)&&(dh=Sm.vl);const Mye={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},Fye={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},hh={vega:"Vega","vega-lite":"Vega-Lite"},Am={vega:Tr.version,"vega-lite":dh?dh.version:"not available"},Dye={vega:e=>e,"vega-lite":(e,t)=>dh.compile(e,{config:t}).spec},Nye=`
|
|
246
|
+
<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
|
|
247
|
+
<circle r="2" cy="8" cx="2"></circle>
|
|
248
|
+
<circle r="2" cy="8" cx="8"></circle>
|
|
249
|
+
<circle r="2" cy="8" cx="14"></circle>
|
|
250
|
+
</svg>`,Oye="chart-wrapper";function Rye(e){return typeof e=="function"}function ZL(e,t,n,i){const r=`<html><head>${t}</head><body><pre><code class="json">`,s=`</code></pre>${n}</body></html>`,o=window.open("");o.document.write(r+e+s),o.document.title=`${hh[i]} JSON Source`}function Lye(e,t){if(e.$schema){const n=dL(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${hh[n.library]}, but mode argument sets ${hh[t]??t}.`);const i=n.library;return XL(Am[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${hh[i]} ${n.version}, but the current version of ${hh[i]} is v${Am[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function KL(e){return!!(e&&"load"in e)}function JL(e){return KL(e)?e:Tr.loader(e)}function Iye(e){var n;const t=((n=e.usermeta)==null?void 0:n.embedOptions)??{};return te(t.defaultStyle)&&(t.defaultStyle=!1),t}async function zye(e,t,n={}){let i,r;te(t)?(r=JL(n.loader),i=JSON.parse(await r.load(t))):i=t;const s=Iye(i),o=s.loader;(!r||o)&&(r=JL(n.loader??o));const a=await QL(s,r),l=await QL(n,r),u={...YL(l,a),config:Wl(l.config??{},a.config??{})};return await Bye(e,i,u,r)}async function QL(e,t){const n=te(e.config)?JSON.parse(await t.load(e.config)):e.config??{},i=te(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return{...e,...i?{patch:i}:{},...n?{config:n}:{}}}function Pye(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function Bye(e,t,n={},i){const r=n.theme?Wl(D2e[n.theme],n.config??{}):n.config,s=so(n.actions)?n.actions:YL({},Mye,n.actions??{}),o={...Fye,...n.i18n},a=n.renderer??"canvas",l=n.logLevel??Tr.Warn,u=n.downloadFileName??"visualization",c=typeof e=="string"?document.querySelector(e):e;if(!c)throw new Error(`${e} does not exist`);if(n.defaultStyle!==!1){const _="vega-embed-style",{root:k,rootContainer:w}=Pye(c);if(!k.getElementById(_)){const $=document.createElement("style");$.id=_,$.innerHTML=n.defaultStyle===void 0||n.defaultStyle===!0?Aye.toString():n.defaultStyle,w.appendChild($)}}const f=Lye(t,n.mode);let d=Dye[f](t,r);if(f==="vega-lite"&&d.$schema){const _=dL(d.$schema);XL(Am.vega,`^${_.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${_.version}, but current version is v${Am.vega}.`)}c.classList.add("vega-embed"),s&&c.classList.add("has-actions"),c.innerHTML="";let h=c;if(s){const _=document.createElement("div");_.classList.add(Oye),c.appendChild(_),h=_}const p=n.patch;if(p&&(d=p instanceof Function?p(d):Mh(d,p,!0,!1).newDocument),n.formatLocale&&Tr.formatLocale(n.formatLocale),n.timeFormatLocale&&Tr.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const _ in n.expressionFunctions){const k=n.expressionFunctions[_];"fn"in k?Tr.expressionFunction(_,k.fn,k.visitor):k instanceof Function&&Tr.expressionFunction(_,k)}const{ast:g}=n,m=Tr.parse(d,f==="vega-lite"?{}:r,{ast:g}),y=new(n.viewClass||Tr.View)(m,{loader:i,logLevel:l,renderer:a,...g?{expr:Tr.expressionInterpreter??n.expr??pce}:{}});if(y.addSignalListener("autosize",(_,k)=>{const{type:w}=k;w=="fit-x"?(h.classList.add("fit-x"),h.classList.remove("fit-y")):w=="fit-y"?(h.classList.remove("fit-x"),h.classList.add("fit-y")):w=="fit"?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")}),n.tooltip!==!1){const{loader:_,tooltip:k}=n,w=_&&!KL(_)?_==null?void 0:_.baseURL:void 0,$=Rye(k)?k:new B2e({baseURL:w,...k===!0?{}:k}).call;y.tooltip($)}let{hover:b}=n;if(b===void 0&&(b=f==="vega"),b){const{hoverSet:_,updateSet:k}=typeof b=="boolean"?{}:b;y.hover(_,k)}n&&(n.width!=null&&y.width(n.width),n.height!=null&&y.height(n.height),n.padding!=null&&y.padding(n.padding)),await y.initialize(h,n.bind).runAsync();let v;if(s!==!1){let _=c;if(n.defaultStyle!==!1||n.forceActionsMenu){const w=document.createElement("details");w.title=o.CLICK_TO_VIEW_ACTIONS,c.append(w),_=w;const $=document.createElement("summary");$.innerHTML=Nye,w.append($),v=S=>{w.contains(S.target)||w.removeAttribute("open")},document.addEventListener("click",v)}const k=document.createElement("div");if(_.append(k),k.classList.add("vega-actions"),s===!0||s.export!==!1){for(const w of["svg","png"])if(s===!0||s.export===!0||s.export[w]){const $=o[`${w.toUpperCase()}_ACTION`],S=document.createElement("a"),E=ie(n.scaleFactor)?n.scaleFactor[w]:n.scaleFactor;S.text=$,S.href="#",S.target="_blank",S.download=`${u}.${w}`,S.addEventListener("mousedown",async function(A){A.preventDefault();const R=await y.toImageURL(w,E);this.href=R}),k.append(S)}}if(s===!0||s.source!==!1){const w=document.createElement("a");w.text=o.SOURCE_ACTION,w.href="#",w.addEventListener("click",function($){ZL(i2(t),n.sourceHeader??"",n.sourceFooter??"",f),$.preventDefault()}),k.append(w)}if(f==="vega-lite"&&(s===!0||s.compiled!==!1)){const w=document.createElement("a");w.text=o.COMPILED_ACTION,w.href="#",w.addEventListener("click",function($){ZL(i2(d),n.sourceHeader??"",n.sourceFooter??"","vega"),$.preventDefault()}),k.append(w)}if(s===!0||s.editor!==!1){const w=n.editorUrl??"https://vega.github.io/editor/",$=document.createElement("a");$.text=o.EDITOR_ACTION,$.href="#",$.addEventListener("click",function(S){Sye(window,w,{config:r,mode:f,renderer:a,spec:i2(t)}),S.preventDefault()}),k.append($)}}function x(){v&&document.removeEventListener("click",v),y.finalize()}return{view:y,spec:t,vgSpec:d,finalize:x,embedOptions:n}}const jye=new Set(["width","height"]);var Uye=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var o=s[r];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const qye=j6(Uye);function Wye(e,t){for(const[n,i]of Object.entries(t))i&&(i&&{}.toString.call(i)==="[object Function]"?i(e.data(n)):e.change(n,Tr.changeset().remove(()=>!0).insert(i)))}function Tm(e={},t={},n=new Set){const i=Object.keys(e),r=Object.keys(t);return e===t||i.length===r.length&&i.filter(s=>!n.has(s)).every(s=>e[s]===t[s])}function eI(e,t){const n=Object.keys(t);for(const i of n)try{e.removeSignalListener(i,t[i])}catch(r){console.warn("Cannot remove invalid signal listener.",r)}return n.length>0}function s5(e,t){const n=Object.keys(t);for(const i of n)try{e.addSignalListener(i,t[i])}catch(r){console.warn("Cannot add invalid signal listener.",r)}return n.length>0}function Hye(e){return new Set(e.flatMap(t=>Object.keys(t)))}function Gye(e,t){if(e===t)return!1;const n={width:!1,height:!1,isExpensive:!1},i="width"in e||"width"in t,r="height"in e||"height"in t;return i&&(!("width"in e)||!("width"in t)||e.width!==t.width)&&("width"in e&&typeof e.width=="number"?n.width=e.width:n.isExpensive=!0),r&&(!("height"in e)||!("height"in t)||e.height!==t.height)&&("height"in e&&typeof e.height=="number"?n.height=e.height:n.isExpensive=!0),[...Hye([e,t])].filter(o=>o!=="width"&&o!=="height").some(o=>!(o in e)||!(o in t)||!qye(e[o],t[o]))&&(n.isExpensive=!0),n.width!==!1||n.height!==!1||n.isExpensive?n:!1}function tI(e,t){const{width:n,height:i}=t;return typeof n<"u"&&typeof i<"u"?{...e,width:n,height:i}:typeof n<"u"?{...e,width:n}:typeof i<"u"?{...e,height:i}:e}function Vye(e){let t;return{c(){t=H("div")},m(n,i){z(n,t,i),e[11](t)},p:re,i:re,o:re,d(n){n&&L(t),e[11](null)}}}function Xye(e,t,n){let{options:i}=t,{spec:r}=t,{view:s}=t,{signalListeners:o={}}=t,{data:a={}}=t;const l=Bm();let u,c={},f={},d={},h={},p;M5(()=>{m()});async function g(){m();try{n(6,u=await zye(p,r,i)),n(1,s=u.view),s5(s,o)&&s.runAsync(),b(s)}catch(_){y(_)}}function m(){u&&(u.finalize(),n(6,u=void 0),n(1,s=void 0))}function y(_){l("onError",{error:_}),console.warn(_)}function b(_){v(),l("onNewView",{view:_})}async function v(){a&&Object.keys(a).length>0&&u!==void 0&&(n(1,s=u.view),Wye(s,a),await s.resize().runAsync())}function x(_){Xi[_?"unshift":"push"](()=>{p=_,n(0,p)})}return e.$$set=_=>{"options"in _&&n(2,i=_.options),"spec"in _&&n(3,r=_.spec),"view"in _&&n(1,s=_.view),"signalListeners"in _&&n(4,o=_.signalListeners),"data"in _&&n(5,a=_.data)},e.$$.update=()=>{if(e.$$.dirty&1056&&(Tm(a,h)||v(),n(10,h=a)),e.$$.dirty&991&&p!==void 0){if(!Tm(i,c,jye))g();else{const _=Gye(tI(r,i),tI(d,c)),k=o,w=f;if(_){if(_.isExpensive)g();else if(u!==void 0){const $=!Tm(k,w);n(1,s=u.view),_.width!==!1&&s.width(_.width),_.height!==!1&&s.height(_.height),$&&(w&&eI(s,w),k&&s5(s,k)),s.runAsync()}}else!Tm(k,w)&&u!==void 0&&(n(1,s=u.view),w&&eI(s,w),k&&s5(s,k),s.runAsync())}n(7,c=i),n(8,f=o),n(9,d=r)}},[p,s,i,r,o,a,u,c,f,d,h,x]}class Yye extends ve{constructor(t){super(),be(this,t,Xye,Vye,he,{options:2,spec:3,view:1,signalListeners:4,data:5})}}function Zye(e){let t,n,i;function r(o){e[6](o)}let s={spec:e[1],data:e[2],signalListeners:e[3],options:e[4]};return e[0]!==void 0&&(s.view=e[0]),t=new Yye({props:s}),Xi.push(()=>Gm(t,"view",r)),t.$on("onNewView",e[7]),t.$on("onError",e[8]),{c(){ce(t.$$.fragment)},m(o,a){le(t,o,a),i=!0},p(o,[a]){const l={};a&2&&(l.spec=o[1]),a&4&&(l.data=o[2]),a&8&&(l.signalListeners=o[3]),a&16&&(l.options=o[4]),!n&&a&1&&(n=!0,l.view=o[0],Wm(()=>n=!1)),t.$set(l)},i(o){i||(F(t.$$.fragment,o),i=!0)},o(o){N(t.$$.fragment,o),i=!1},d(o){ue(t,o)}}}const Kye="vega";function Jye(e,t,n){let i,{spec:r}=t,{options:s={}}=t,{data:o={}}=t,{signalListeners:a={}}=t,{view:l=void 0}=t;function u(d){l=d,n(0,l)}function c(d){N5.call(this,e,d)}function f(d){N5.call(this,e,d)}return e.$$set=d=>{"spec"in d&&n(1,r=d.spec),"options"in d&&n(5,s=d.options),"data"in d&&n(2,o=d.data),"signalListeners"in d&&n(3,a=d.signalListeners),"view"in d&&n(0,l=d.view)},e.$$.update=()=>{e.$$.dirty&32&&n(4,i={...s,mode:Kye})},[l,r,o,a,i,s,u,c,f]}class nI extends ve{constructor(t){super(),be(this,t,Jye,Zye,he,{spec:1,options:5,data:2,signalListeners:3,view:0})}}function Qye(e){let t,n;return t=new nI({props:{spec:e[1],options:e[0]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&2&&(s.spec=i[1]),r&1&&(s.options=i[0]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function ebe(e){let t,n;return t=new nI({props:{data:e[2],spec:e[1],options:e[0]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&4&&(s.data=i[2]),r&2&&(s.spec=i[1]),r&1&&(s.options=i[0]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function tbe(e){let t,n,i,r;const s=[ebe,Qye],o=[];function a(l,u){return l[2]&&l[1]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function nbe(e,t,n){let i,r,s,{componentData:o}=t;return e.$$set=a=>{"componentData"in a&&n(3,o=a.componentData)},e.$$.update=()=>{e.$$.dirty&8&&n(2,{data:i,spec:r,options:s}=o,i,(n(1,r),n(3,o)),(n(0,s),n(3,o)))},[s,r,i,o]}class iI extends ve{constructor(t){super(),be(this,t,nbe,tbe,he,{componentData:3})}}function ibe(e){var r;let t,n=(((r=e[0])==null?void 0:r.text)||"")+"",i;return{c(){t=H("p"),i=Be(n),D(t,"data-component","text")},m(s,o){z(s,t,o),X(t,i)},p(s,[o]){var a;o&1&&n!==(n=(((a=s[0])==null?void 0:a.text)||"")+"")&&pt(i,n)},i:re,o:re,d(s){s&&L(t)}}}function rbe(e,t,n){let{componentData:i}=t;return e.$$set=r=>{"componentData"in r&&n(0,i=r.componentData)},[i]}class rI extends ve{constructor(t){super(),be(this,t,rbe,ibe,he,{componentData:0})}}function sbe(e){let t;return{c(){t=Be(e[0])},m(n,i){z(n,t,i)},p(n,i){i&1&&pt(t,n[0])},i:re,o:re,d(n){n&&L(t)}}}function obe(e){let t,n,i;var r=e[1];function s(o,a){return{props:{componentData:o[0]}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(a&2&&r!==(r=o[1])){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&1&&(l.componentData=o[0]),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function abe(e){let t,n,i,r;const s=[obe,sbe],o=[];function a(l,u){return l[1]?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,[u]){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function lbe(e,t,n){let{componentData:i}=t,r;const s={artifacts:j5,dag:J5,heading:i6,image:o6,log:a6,markdown:M6,progressBar:O6,text:rI,vegaChart:iI},o=i==null?void 0:i.type;return o&&(r=s==null?void 0:s[o],r||console.error("Unknown component type: ",o)),e.$$set=a=>{"componentData"in a&&n(0,i=a.componentData)},[i,r]}class sI extends ve{constructor(t){super(),be(this,t,lbe,abe,he,{componentData:0})}}function oI(e,t,n){const i=e.slice();return i[3]=t[n],i[5]=n,i}function aI(e,t,n){const i=e.slice();return i[6]=t[n],i}function lI(e){let t,n,i,r,s=Oe(e[1]),o=[];for(let l=0;l<s.length;l+=1)o[l]=cI(oI(e,s,l));const a=l=>N(o[l],1,1,()=>{o[l]=null});return{c(){t=H("div"),n=H("table"),i=H("tbody");for(let l=0;l<o.length;l+=1)o[l].c();D(t,"class","tableContainer"),D(t,"data-component","table-vertical")},m(l,u){z(l,t,u),X(t,n),X(n,i);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(i,null);r=!0},p(l,u){if(u&3){s=Oe(l[1]);let c;for(c=0;c<s.length;c+=1){const f=oI(l,s,c);o[c]?(o[c].p(f,u),F(o[c],1)):(o[c]=cI(f),o[c].c(),F(o[c],1),o[c].m(i,null))}for($e(),c=s.length;c<o.length;c+=1)a(c);Ee()}},i(l){if(!r){for(let u=0;u<s.length;u+=1)F(o[u]);r=!0}},o(l){o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)N(o[u]);r=!1},d(l){l&&L(t),Rt(o,l)}}}function uI(e){let t,n,i;return n=new sI({props:{componentData:e[6][e[5]]}}),{c(){t=H("td"),ce(n.$$.fragment),D(t,"class","svelte-gl9h79")},m(r,s){z(r,t,s),le(n,t,null),i=!0},p(r,s){const o={};s&1&&(o.componentData=r[6][r[5]]),n.$set(o)},i(r){i||(F(n.$$.fragment,r),i=!0)},o(r){N(n.$$.fragment,r),i=!1},d(r){r&&L(t),ue(n)}}}function cI(e){let t,n,i=e[3]+"",r,s,o,a,l=Oe(e[0]),u=[];for(let f=0;f<l.length;f+=1)u[f]=uI(aI(e,l,f));const c=f=>N(u[f],1,1,()=>{u[f]=null});return{c(){t=H("tr"),n=H("td"),r=Be(i),s=je();for(let f=0;f<u.length;f+=1)u[f].c();o=je(),D(n,"class","labelColumn svelte-gl9h79")},m(f,d){z(f,t,d),X(t,n),X(n,r),X(t,s);for(let h=0;h<u.length;h+=1)u[h]&&u[h].m(t,null);X(t,o),a=!0},p(f,d){if((!a||d&2)&&i!==(i=f[3]+"")&&pt(r,i),d&1){l=Oe(f[0]);let h;for(h=0;h<l.length;h+=1){const p=aI(f,l,h);u[h]?(u[h].p(p,d),F(u[h],1)):(u[h]=uI(p),u[h].c(),F(u[h],1),u[h].m(t,o))}for($e(),h=l.length;h<u.length;h+=1)c(h);Ee()}},i(f){if(!a){for(let d=0;d<l.length;d+=1)F(u[d]);a=!0}},o(f){u=u.filter(Boolean);for(let d=0;d<u.length;d+=1)N(u[d]);a=!1},d(f){f&&L(t),Rt(u,f)}}}function ube(e){let t,n,i=e[1]&&e[0]&&lI(e);return{c(){i&&i.c(),t=Ae()},m(r,s){i&&i.m(r,s),z(r,t,s),n=!0},p(r,[s]){r[1]&&r[0]?i?(i.p(r,s),s&3&&F(i,1)):(i=lI(r),i.c(),F(i,1),i.m(t.parentNode,t)):i&&($e(),N(i,1,1,()=>{i=null}),Ee())},i(r){n||(F(i),n=!0)},o(r){N(i),n=!1},d(r){r&&L(t),i&&i.d(r)}}}function cbe(e,t,n){let i,r,{componentData:s}=t;return e.$$set=o=>{"componentData"in o&&n(2,s=o.componentData)},e.$$.update=()=>{e.$$.dirty&4&&n(1,{columns:i,data:r}=s,i,(n(0,r),n(2,s)))},[r,i,s]}class fbe extends ve{constructor(t){super(),be(this,t,cbe,ube,he,{componentData:2})}}function fI(e,t,n){const i=e.slice();return i[3]=t[n],i}function dI(e,t,n){const i=e.slice();return i[6]=t[n],i}function hI(e,t,n){const i=e.slice();return i[9]=t[n],i}function pI(e){let t,n,i,r,s,o,a,l=Oe(e[1]),u=[];for(let h=0;h<l.length;h+=1)u[h]=gI(hI(e,l,h));let c=Oe(e[0]),f=[];for(let h=0;h<c.length;h+=1)f[h]=yI(fI(e,c,h));const d=h=>N(f[h],1,1,()=>{f[h]=null});return{c(){t=H("div"),n=H("table"),i=H("thead"),r=H("tr");for(let h=0;h<u.length;h+=1)u[h].c();s=je(),o=H("tbody");for(let h=0;h<f.length;h+=1)f[h].c();D(t,"class","tableContainer svelte-q3hq57"),D(t,"data-component","table-horizontal")},m(h,p){z(h,t,p),X(t,n),X(n,i),X(i,r);for(let g=0;g<u.length;g+=1)u[g]&&u[g].m(r,null);X(n,s),X(n,o);for(let g=0;g<f.length;g+=1)f[g]&&f[g].m(o,null);a=!0},p(h,p){if(p&2){l=Oe(h[1]);let g;for(g=0;g<l.length;g+=1){const m=hI(h,l,g);u[g]?u[g].p(m,p):(u[g]=gI(m),u[g].c(),u[g].m(r,null))}for(;g<u.length;g+=1)u[g].d(1);u.length=l.length}if(p&1){c=Oe(h[0]);let g;for(g=0;g<c.length;g+=1){const m=fI(h,c,g);f[g]?(f[g].p(m,p),F(f[g],1)):(f[g]=yI(m),f[g].c(),F(f[g],1),f[g].m(o,null))}for($e(),g=c.length;g<f.length;g+=1)d(g);Ee()}},i(h){if(!a){for(let p=0;p<c.length;p+=1)F(f[p]);a=!0}},o(h){f=f.filter(Boolean);for(let p=0;p<f.length;p+=1)N(f[p]);a=!1},d(h){h&&L(t),Rt(u,h),Rt(f,h)}}}function gI(e){let t,n=e[9]+"",i;return{c(){t=H("th"),i=Be(n),D(t,"class","svelte-q3hq57")},m(r,s){z(r,t,s),X(t,i)},p(r,s){s&2&&n!==(n=r[9]+"")&&pt(i,n)},d(r){r&&L(t)}}}function mI(e){let t,n,i;return n=new sI({props:{componentData:e[6]}}),{c(){t=H("td"),ce(n.$$.fragment)},m(r,s){z(r,t,s),le(n,t,null),i=!0},p(r,s){const o={};s&1&&(o.componentData=r[6]),n.$set(o)},i(r){i||(F(n.$$.fragment,r),i=!0)},o(r){N(n.$$.fragment,r),i=!1},d(r){r&&L(t),ue(n)}}}function yI(e){let t,n,i,r=Oe(e[3]),s=[];for(let a=0;a<r.length;a+=1)s[a]=mI(dI(e,r,a));const o=a=>N(s[a],1,1,()=>{s[a]=null});return{c(){t=H("tr");for(let a=0;a<s.length;a+=1)s[a].c();n=je()},m(a,l){z(a,t,l);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(t,null);X(t,n),i=!0},p(a,l){if(l&1){r=Oe(a[3]);let u;for(u=0;u<r.length;u+=1){const c=dI(a,r,u);s[u]?(s[u].p(c,l),F(s[u],1)):(s[u]=mI(c),s[u].c(),F(s[u],1),s[u].m(t,n))}for($e(),u=r.length;u<s.length;u+=1)o(u);Ee()}},i(a){if(!i){for(let l=0;l<r.length;l+=1)F(s[l]);i=!0}},o(a){s=s.filter(Boolean);for(let l=0;l<s.length;l+=1)N(s[l]);i=!1},d(a){a&&L(t),Rt(s,a)}}}function dbe(e){let t,n,i=e[1]&&e[0]&&pI(e);return{c(){i&&i.c(),t=Ae()},m(r,s){i&&i.m(r,s),z(r,t,s),n=!0},p(r,[s]){r[1]&&r[0]?i?(i.p(r,s),s&3&&F(i,1)):(i=pI(r),i.c(),F(i,1),i.m(t.parentNode,t)):i&&($e(),N(i,1,1,()=>{i=null}),Ee())},i(r){n||(F(i),n=!0)},o(r){N(i),n=!1},d(r){r&&L(t),i&&i.d(r)}}}function hbe(e,t,n){let i,r,{componentData:s}=t;return e.$$set=o=>{"componentData"in o&&n(2,s=o.componentData)},e.$$.update=()=>{e.$$.dirty&4&&n(1,{columns:i,data:r}=s,i,(n(0,r),n(2,s)))},[r,i,s]}class pbe extends ve{constructor(t){super(),be(this,t,hbe,dbe,he,{componentData:2})}}function bI(e){let t,n,i;var r=e[3];function s(o,a){return{props:{componentData:o[0]}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(r!==(r=o[3])){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&1&&(l.componentData=o[0]),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function gbe(e){let t,n,i=e[2]&&e[1]&&bI(e);return{c(){i&&i.c(),t=Ae()},m(r,s){i&&i.m(r,s),z(r,t,s),n=!0},p(r,[s]){r[2]&&r[1]?i?(i.p(r,s),s&6&&F(i,1)):(i=bI(r),i.c(),F(i,1),i.m(t.parentNode,t)):i&&($e(),N(i,1,1,()=>{i=null}),Ee())},i(r){n||(F(i),n=!0)},o(r){N(i),n=!1},d(r){r&&L(t),i&&i.d(r)}}}function mbe(e,t,n){let i,r,s,{componentData:o}=t;const a=s?fbe:pbe;return e.$$set=l=>{"componentData"in l&&n(0,o=l.componentData)},e.$$.update=()=>{e.$$.dirty&1&&n(2,{columns:i,data:r,vertical:s}=o,i,(n(1,r),n(0,o)))},[o,r,i,a]}class ybe extends ve{constructor(t){super(),be(this,t,mbe,gbe,he,{componentData:0})}}function vI(e,t,n){const i=e.slice();return i[3]=t[n],i}function bbe(e){let t,n,i,r;const s=[xbe,vbe],o=[];function a(l,u){var c;return(l[0].type==="page"||l[0].type==="section")&&((c=l[0])!=null&&c.contents)?0:1}return t=a(e),n=o[t]=s[t](e),{c(){n.c(),i=Ae()},m(l,u){o[t].m(l,u),z(l,i,u),r=!0},p(l,u){let c=t;t=a(l),t===c?o[t].p(l,u):($e(),N(o[c],1,1,()=>{o[c]=null}),Ee(),n=o[t],n?n.p(l,u):(n=o[t]=s[t](l),n.c()),F(n,1),n.m(i.parentNode,i))},i(l){r||(F(n),r=!0)},o(l){N(n),r=!1},d(l){l&&L(i),o[t].d(l)}}}function vbe(e){let t,n,i;var r=e[1];function s(o,a){return{props:{componentData:o[0]}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(r!==(r=o[1])){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&1&&(l.componentData=o[0]),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function xbe(e){let t,n,i;var r=e[1];function s(o,a){return{props:{componentData:o[0],$$slots:{default:[_be]},$$scope:{ctx:o}}}}return r&&(t=Ye(r,s(e))),{c(){t&&ce(t.$$.fragment),n=Ae()},m(o,a){t&&le(t,o,a),z(o,n,a),i=!0},p(o,a){if(r!==(r=o[1])){if(t){$e();const l=t;N(l.$$.fragment,1,0,()=>{ue(l,1)}),Ee()}r?(t=Ye(r,s(o)),ce(t.$$.fragment),F(t.$$.fragment,1),le(t,n.parentNode,n)):t=null}else if(r){const l={};a&1&&(l.componentData=o[0]),a&65&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)}},i(o){i||(t&&F(t.$$.fragment,o),i=!0)},o(o){t&&N(t.$$.fragment,o),i=!1},d(o){o&&L(n),t&&ue(t,o)}}}function xI(e){let t,n;return t=new o5({props:{componentData:e[3]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.componentData=i[3]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function _be(e){let t,n,i=Oe(e[0].contents),r=[];for(let o=0;o<i.length;o+=1)r[o]=xI(vI(e,i,o));const s=o=>N(r[o],1,1,()=>{r[o]=null});return{c(){for(let o=0;o<r.length;o+=1)r[o].c();t=Ae()},m(o,a){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(o,a);z(o,t,a),n=!0},p(o,a){if(a&1){i=Oe(o[0].contents);let l;for(l=0;l<i.length;l+=1){const u=vI(o,i,l);r[l]?(r[l].p(u,a),F(r[l],1)):(r[l]=xI(u),r[l].c(),F(r[l],1),r[l].m(t.parentNode,t))}for($e(),l=i.length;l<r.length;l+=1)s(l);Ee()}},i(o){if(!n){for(let a=0;a<i.length;a+=1)F(r[a]);n=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)N(r[a]);n=!1},d(o){o&&L(t),Rt(r,o)}}}function wbe(e){let t,n,i=e[1]&&bbe(e);return{c(){i&&i.c(),t=Ae()},m(r,s){i&&i.m(r,s),z(r,t,s),n=!0},p(r,[s]){r[1]&&i.p(r,s)},i(r){n||(F(i),n=!0)},o(r){N(i),n=!1},d(r){r&&L(t),i&&i.d(r)}}}function kbe(e,t,n){let{componentData:i}=t;const r={artifacts:j5,dag:J5,heading:i6,image:o6,log:a6,markdown:M6,page:Nj,progressBar:O6,section:zj,subtitle:e6,table:ybe,text:rI,title:Q5,vegaChart:iI};let s=r==null?void 0:r[i.type];return s||console.error("Unknown component type: ",i.type),e.$$set=o=>{"componentData"in o&&n(0,i=o.componentData)},[i,s]}class o5 extends ve{constructor(t){super(),be(this,t,kbe,wbe,he,{componentData:0})}}function $be(e){let t,n,i;const r=e[1].default,s=ct(r,e,e[0],null);return{c(){t=H("main"),n=H("div"),s&&s.c(),D(n,"class","mainContainer svelte-mqeomk"),D(t,"class","svelte-mqeomk")},m(o,a){z(o,t,a),X(t,n),s&&s.m(n,null),i=!0},p(o,[a]){s&&s.p&&(!i||a&1)&&dt(s,r,o,o[0],i?ft(r,o[0],a,null):ht(o[0]),null)},i(o){i||(F(s,o),i=!0)},o(o){N(s,o),i=!1},d(o){o&&L(t),s&&s.d(o)}}}function Ebe(e,t,n){let{$$slots:i={},$$scope:r}=t;return e.$$set=s=>{"$$scope"in s&&n(0,r=s.$$scope)},[r,i]}class Cbe extends ve{constructor(t){super(),be(this,t,Ebe,$be,he,{})}}const ph=/^[a-z0-9]+(-[a-z0-9]+)*$/,Mm=(e,t,n,i="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const a=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:i,prefix:l,name:a};return t&&!Fm(u)?null:u}const s=r[0],o=s.split("-");if(o.length>1){const a={provider:i,prefix:o.shift(),name:o.join("-")};return t&&!Fm(a)?null:a}if(n&&i===""){const a={provider:i,prefix:"",name:s};return t&&!Fm(a,n)?null:a}return null},Fm=(e,t)=>e?!!((e.provider===""||e.provider.match(ph))&&(t&&e.prefix===""||e.prefix.match(ph))&&e.name.match(ph)):!1,_I=Object.freeze({left:0,top:0,width:16,height:16}),Dm=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nm=Object.freeze({..._I,...Dm}),a5=Object.freeze({...Nm,body:"",hidden:!1});function Sbe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(n.rotate=i),n}function wI(e,t){const n=Sbe(e,t);for(const i in a5)i in Dm?i in e&&!(i in n)&&(n[i]=Dm[i]):i in t?n[i]=t[i]:i in e&&(n[i]=e[i]);return n}function Abe(e,t){const n=e.icons,i=e.aliases||Object.create(null),r=Object.create(null);function s(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=i[o]&&i[o].parent,l=a&&s(a);l&&(r[o]=[a].concat(l))}return r[o]}return(t||Object.keys(n).concat(Object.keys(i))).forEach(s),r}function Tbe(e,t,n){const i=e.icons,r=e.aliases||Object.create(null);let s={};function o(a){s=wI(i[a]||r[a],s)}return o(t),n.forEach(o),wI(e,s)}function kI(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const i=Abe(e);for(const r in i){const s=i[r];s&&(t(r,Tbe(e,r,s)),n.push(r))}return n}const Mbe={provider:"",aliases:{},not_found:{},..._I};function l5(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function $I(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!l5(e,Mbe))return null;const n=t.icons;for(const r in n){const s=n[r];if(!r.match(ph)||typeof s.body!="string"||!l5(s,a5))return null}const i=t.aliases||Object.create(null);for(const r in i){const s=i[r],o=s.parent;if(!r.match(ph)||typeof o!="string"||!n[o]&&!i[o]||!l5(s,a5))return null}return t}const EI=Object.create(null);function Fbe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ol(e,t){const n=EI[e]||(EI[e]=Object.create(null));return n[t]||(n[t]=Fbe(e,t))}function u5(e,t){return $I(t)?kI(t,(n,i)=>{i?e.icons[n]=i:e.missing.add(n)}):[]}function Dbe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let gh=!1;function CI(e){return typeof e=="boolean"&&(gh=e),gh}function Nbe(e){const t=typeof e=="string"?Mm(e,!0,gh):e;if(t){const n=Ol(t.provider,t.prefix),i=t.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function Obe(e,t){const n=Mm(e,!0,gh);if(!n)return!1;const i=Ol(n.provider,n.prefix);return Dbe(i,n.name,t)}function Rbe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),gh&&!t&&!e.prefix){let r=!1;return $I(e)&&(e.prefix="",kI(e,(s,o)=>{o&&Obe(s,o)&&(r=!0)})),r}const n=e.prefix;if(!Fm({provider:t,prefix:n,name:"a"}))return!1;const i=Ol(t,n);return!!u5(i,e)}const SI=Object.freeze({width:null,height:null}),AI=Object.freeze({...SI,...Dm}),Lbe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ibe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function TI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const i=e.split(Lbe);if(i===null||!i.length)return e;const r=[];let s=i.shift(),o=Ibe.test(s);for(;;){if(o){const a=parseFloat(s);isNaN(a)?r.push(s):r.push(Math.ceil(a*t*n)/n)}else r.push(s);if(s=i.shift(),s===void 0)return r.join("");o=!o}}function zbe(e,t="defs"){let n="";const i=e.indexOf("<"+t);for(;i>=0;){const r=e.indexOf(">",i),s=e.indexOf("</"+t);if(r===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;n+=e.slice(r+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:n,content:e}}function Pbe(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Bbe(e,t,n){const i=zbe(e);return Pbe(i.defs,t+i.content+n)}const jbe=e=>e==="unset"||e==="undefined"||e==="none";function Ube(e,t){const n={...Nm,...e},i={...AI,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,i].forEach(g=>{const m=[],y=g.hFlip,b=g.vFlip;let v=g.rotate;y?b?v+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):b&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let x;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:x=r.height/2+r.top,m.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,m.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}v%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),m.length&&(s=Bbe(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,a=i.height,l=r.width,u=r.height;let c,f;o===null?(f=a===null?"1em":a==="auto"?u:a,c=TI(f,l/u)):(c=o==="auto"?l:o,f=a===null?TI(c,u/l):a==="auto"?u:a);const d={},h=(g,m)=>{jbe(m)||(d[g]=m.toString())};h("width",c),h("height",f);const p=[r.left,r.top,l,u];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:s}}const qbe=/\sid="(\S+)"/g,Wbe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Hbe=0;function Gbe(e,t=Wbe){const n=[];let i;for(;i=qbe.exec(e);)n.push(i[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const o=typeof t=="function"?t(s):t+(Hbe++).toString(),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const c5=Object.create(null);function Vbe(e,t){c5[e]=t}function f5(e){return c5[e]||c5[""]}function d5(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const h5=Object.create(null),mh=["https://api.simplesvg.com","https://api.unisvg.com"],Om=[];for(;mh.length>0;)mh.length===1||Math.random()>.5?Om.push(mh.shift()):Om.push(mh.pop());h5[""]=d5({resources:["https://api.iconify.design"].concat(Om)});function Xbe(e,t){const n=d5(t);return n===null?!1:(h5[e]=n,!0)}function p5(e){return h5[e]}let MI=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function Ybe(e,t){const n=p5(e);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let r=0;n.resources.forEach(o=>{r=Math.max(r,o.length)});const s=t+".json?icons=";i=n.maxURL-r-n.path.length-s.length}return i}function Zbe(e){return e===404}const Kbe=(e,t,n)=>{const i=[],r=Ybe(e,t),s="icons";let o={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=r&&u>0&&(i.push(o),o={type:s,provider:e,prefix:t,icons:[]},a=l.length),o.icons.push(l)}),i.push(o),i};function Jbe(e){if(typeof e=="string"){const t=p5(e);if(t)return t.path}return"/"}const Qbe={prepare:Kbe,send:(e,t,n)=>{if(!MI){n("abort",424);return}let i=Jbe(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});i+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let r=503;MI(e+i).then(s=>{const o=s.status;if(o!==200){setTimeout(()=>{n(Zbe(o)?"abort":"next",o)});return}return r=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",r)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",r)})}};function e3e(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,s)=>r.provider!==s.provider?r.provider.localeCompare(s.provider):r.prefix!==s.prefix?r.prefix.localeCompare(s.prefix):r.name.localeCompare(s.name));let i={provider:"",prefix:"",name:""};return e.forEach(r=>{if(i.name===r.name&&i.prefix===r.prefix&&i.provider===r.provider)return;i=r;const s=r.provider,o=r.prefix,a=r.name,l=n[s]||(n[s]=Object.create(null)),u=l[o]||(l[o]=Ol(s,o));let c;a in u.icons?c=t.loaded:o===""||u.missing.has(a)?c=t.missing:c=t.pending;const f={provider:s,prefix:o,name:a};c.push(f)}),t}function FI(e,t){e.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(r=>r.id!==t))})}function t3e(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const i=e.provider,r=e.prefix;t.forEach(s=>{const o=s.icons,a=o.pending.length;o.pending=o.pending.filter(l=>{if(l.prefix!==r)return!0;const u=l.name;if(e.icons[u])o.loaded.push({provider:i,prefix:r,name:u});else if(e.missing.has(u))o.missing.push({provider:i,prefix:r,name:u});else return n=!0,!0;return!1}),o.pending.length!==a&&(n||FI([e],s.id),s.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),s.abort))})}))}let n3e=0;function i3e(e,t,n){const i=n3e++,r=FI.bind(null,n,i);if(!t.pending.length)return r;const s={id:i,icons:t,callback:e,abort:r};return n.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(s)}),r}function r3e(e,t=!0,n=!1){const i=[];return e.forEach(r=>{const s=typeof r=="string"?Mm(r,t,n):r;s&&i.push(s)}),i}var s3e={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function o3e(e,t,n,i){const r=e.resources.length,s=e.random?Math.floor(Math.random()*r):e.index;let o;if(e.random){let k=e.resources.slice(0);for(o=[];k.length>1;){const w=Math.floor(Math.random()*k.length);o.push(k[w]),k=k.slice(0,w).concat(k.slice(w+1))}o=o.concat(k)}else o=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let l="pending",u=0,c,f=null,d=[],h=[];typeof i=="function"&&h.push(i);function p(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),p(),d.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),d=[]}function m(k,w){w&&(h=[]),typeof k=="function"&&h.push(k)}function y(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:d.length,subscribe:m,abort:g}}function b(){l="failed",h.forEach(k=>{k(void 0,c)})}function v(){d.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),d=[]}function x(k,w,$){const S=w!=="success";switch(d=d.filter(E=>E!==k),l){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){c=$,b();return}if(S){c=$,d.length||(o.length?_():b());return}if(p(),v(),!e.random){const E=e.resources.indexOf(k.resource);E!==-1&&E!==e.index&&(e.index=E)}l="completed",h.forEach(E=>{E($)})}function _(){if(l!=="pending")return;p();const k=o.shift();if(k===void 0){if(d.length){f=setTimeout(()=>{p(),l==="pending"&&(v(),b())},e.timeout);return}b();return}const w={status:"pending",resource:k,callback:($,S)=>{x(w,$,S)}};d.push(w),u++,f=setTimeout(_,e.rotate),n(k,t,w.callback)}return setTimeout(_),y}function DI(e){const t={...s3e,...e};let n=[];function i(){n=n.filter(a=>a().status==="pending")}function r(a,l,u){const c=o3e(t,a,l,(f,d)=>{i(),u&&u(f,d)});return n.push(c),c}function s(a){return n.find(l=>a(l))||null}return{query:r,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:i}}function NI(){}const g5=Object.create(null);function a3e(e){if(!g5[e]){const t=p5(e);if(!t)return;const n=DI(t),i={config:t,redundancy:n};g5[e]=i}return g5[e]}function l3e(e,t,n){let i,r;if(typeof e=="string"){const s=f5(e);if(!s)return n(void 0,424),NI;r=s.send;const o=a3e(e);o&&(i=o.redundancy)}else{const s=d5(e);if(s){i=DI(s);const o=e.resources?e.resources[0]:"",a=f5(o);a&&(r=a.send)}}return!i||!r?(n(void 0,424),NI):i.query(t,r,n)().abort}const OI="iconify2",yh="iconify",RI=yh+"-count",LI=yh+"-version",II=36e5,u3e=168,c3e=50;function m5(e,t){try{return e.getItem(t)}catch{}}function y5(e,t,n){try{return e.setItem(t,n),!0}catch{}}function zI(e,t){try{e.removeItem(t)}catch{}}function b5(e,t){return y5(e,RI,t.toString())}function v5(e){return parseInt(m5(e,RI))||0}const Rm={local:!0,session:!0},PI={local:new Set,session:new Set};let x5=!1;function f3e(e){x5=e}let Lm=typeof window>"u"?{}:window;function BI(e){const t=e+"Storage";try{if(Lm&&Lm[t]&&typeof Lm[t].length=="number")return Lm[t]}catch{}Rm[e]=!1}function jI(e,t){const n=BI(e);if(!n)return;const i=m5(n,LI);if(i!==OI){if(i){const a=v5(n);for(let l=0;l<a;l++)zI(n,yh+l.toString())}y5(n,LI,OI),b5(n,0);return}const r=Math.floor(Date.now()/II)-u3e,s=a=>{const l=yh+a.toString(),u=m5(n,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>r&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,a))return!0}catch{}zI(n,l)}};let o=v5(n);for(let a=o-1;a>=0;a--)s(a)||(a===o-1?(o--,b5(n,o)):PI[e].add(a))}function UI(){if(!x5){f3e(!0);for(const e in Rm)jI(e,t=>{const n=t.data,i=t.provider,r=n.prefix,s=Ol(i,r);if(!u5(s,n).length)return!1;const o=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,o):o,!0})}}function d3e(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const i in Rm)jI(i,r=>{const s=r.data;return r.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function h3e(e,t){x5||UI();function n(i){let r;if(!Rm[i]||!(r=BI(i)))return;const s=PI[i];let o;if(s.size)s.delete(o=Array.from(s).shift());else if(o=v5(r),o>=c3e||!b5(r,o+1))return;const a={cached:Math.floor(Date.now()/II),provider:e.provider,data:t};return y5(r,yh+o.toString(),JSON.stringify(a))}t.lastModified&&!d3e(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function qI(){}function p3e(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,t3e(e)}))}function g3e(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:i}=e,r=e.iconsToLoad;delete e.iconsToLoad;let s;if(!r||!(s=f5(n)))return;s.prepare(n,i,r).forEach(a=>{l3e(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{e.missing.add(u)});else try{const u=u5(e,l);if(!u.length)return;const c=e.pendingIcons;c&&u.forEach(f=>{c.delete(f)}),h3e(e,l)}catch(u){console.error(u)}p3e(e)})})}))}const m3e=(e,t)=>{const n=r3e(e,!0,CI()),i=e3e(n);if(!i.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(i.loaded,i.missing,i.pending,qI)}),()=>{l=!1}}const r=Object.create(null),s=[];let o,a;return i.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===o)return;o=u,a=c,s.push(Ol(u,c));const f=r[u]||(r[u]=Object.create(null));f[c]||(f[c]=[])}),i.pending.forEach(l=>{const{provider:u,prefix:c,name:f}=l,d=Ol(u,c),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),r[u][c].push(f))}),s.forEach(l=>{const{provider:u,prefix:c}=l;r[u][c].length&&g3e(l,r[u][c])}),t?i3e(t,i,s):qI};function y3e(e,t){const n={...e};for(const i in t){const r=t[i],s=typeof r;i in SI?(r===null||r&&(s==="string"||s==="number"))&&(n[i]=r):s===typeof n[i]&&(n[i]=i==="rotate"?r%4:r)}return n}const b3e=/[\s,]+/;function v3e(e,t){t.split(b3e).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function x3e(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function i(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:i(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/r,s%1===0?i(s):0)}}return t}function _3e(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)n+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function w3e(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function k3e(e){return"data:image/svg+xml,"+w3e(e)}function $3e(e){return'url("'+k3e(e)+'")'}const WI={...AI,inline:!1},E3e={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},C3e={display:"inline-block"},_5={"background-color":"currentColor"},HI={"background-color":"transparent"},GI={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},VI={"-webkit-mask":_5,mask:_5,background:HI};for(const e in VI){const t=VI[e];for(const n in GI)t[e+"-"+n]=GI[n]}function S3e(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function A3e(e,t){const n=y3e(WI,t),i=t.mode||"svg",r=i==="svg"?{...E3e}:{};e.body.indexOf("xlink:")===-1&&delete r["xmlns:xlink"];let s=typeof t.style=="string"?t.style:"";for(let y in t){const b=t[y];if(b!==void 0)switch(y){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[y]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&v3e(n,b);break;case"color":s=s+(s.length>0&&s.trim().slice(-1)!==";"?";":"")+"color: "+b+"; ";break;case"rotate":typeof b=="string"?n[y]=x3e(b):typeof b=="number"&&(n[y]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete r["aria-hidden"];break;default:if(y.slice(0,3)==="on:")break;WI[y]===void 0&&(r[y]=b)}}const o=Ube(e,n),a=o.attributes;if(n.inline&&(s="vertical-align: -0.125em; "+s),i==="svg"){Object.assign(r,a),s!==""&&(r.style=s);let y=0,b=t.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),{svg:!0,attributes:r,body:Gbe(o.body,b?()=>b+"ID"+y++:"iconifySvelte")}}const{body:l,width:u,height:c}=e,f=i==="mask"||(i==="bg"?!1:l.indexOf("currentColor")!==-1),d=_3e(l,{...a,width:u+"",height:c+""}),p={"--svg":$3e(d)},g=y=>{const b=a[y];b&&(p[y]=S3e(b))};g("width"),g("height"),Object.assign(p,C3e,f?_5:HI);let m="";for(const y in p)m+=y+": "+p[y]+";";return r.style=m+s,{svg:!1,attributes:r}}if(CI(!0),Vbe("",Qbe),typeof document<"u"&&typeof window<"u"){UI();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Rbe(i))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const i="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Xbe(n,r)||console.error(i)}catch{console.error(i)}}}}function T3e(e,t,n,i,r){function s(){t.loading&&(t.loading.abort(),t.loading=null)}if(typeof e=="object"&&e!==null&&typeof e.body=="string")return t.name="",s(),{data:{...Nm,...e}};let o;if(typeof e!="string"||(o=Mm(e,!1,!0))===null)return s(),null;const a=Nbe(o);if(!a)return n&&(!t.loading||t.loading.name!==e)&&(s(),t.name="",t.loading={name:e,abort:m3e([o],i)}),null;s(),t.name!==e&&(t.name=e,r&&!t.destroyed&&r(e));const l=["iconify"];return o.prefix!==""&&l.push("iconify--"+o.prefix),o.provider!==""&&l.push("iconify--"+o.provider),{data:a,classes:l}}function M3e(e,t){return e?A3e({...Nm,...e},t):null}function XI(e){let t;function n(s,o){return s[0].svg?D3e:F3e}let i=n(e),r=i(e);return{c(){r.c(),t=Ae()},m(s,o){r.m(s,o),z(s,t,o)},p(s,o){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&L(t),r.d(s)}}}function F3e(e){let t,n=[e[0].attributes],i={};for(let r=0;r<n.length;r+=1)i=Ge(i,n[r]);return{c(){t=H("span"),A5(t,i)},m(r,s){z(r,t,s)},p(r,s){A5(t,i=fi(n,[s&1&&r[0].attributes]))},d(r){r&&L(t)}}}function D3e(e){let t,n=e[0].body+"",i=[e[0].attributes],r={};for(let s=0;s<i.length;s+=1)r=Ge(r,i[s]);return{c(){t=Si("svg"),T5(t,r)},m(s,o){z(s,t,o),t.innerHTML=n},p(s,o){o&1&&n!==(n=s[0].body+"")&&(t.innerHTML=n),T5(t,r=fi(i,[o&1&&s[0].attributes]))},d(s){s&&L(t)}}}function N3e(e){let t,n=e[0]&&XI(e);return{c(){n&&n.c(),t=Ae()},m(i,r){n&&n.m(i,r),z(i,t,r)},p(i,[r]){i[0]?n?n.p(i,r):(n=XI(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:re,o:re,d(i){i&&L(t),n&&n.d(i)}}}function O3e(e,t,n){const i={name:"",loading:null,destroyed:!1};let r=!1,s=0,o;const a=u=>{typeof t.onLoad=="function"&&t.onLoad(u),Bm()("load",{icon:u})};function l(){n(3,s++,s)}return Mc(()=>{n(2,r=!0)}),M5(()=>{n(1,i.destroyed=!0,i),i.loading&&(i.loading.abort(),n(1,i.loading=null,i))}),e.$$set=u=>{n(6,t=Ge(Ge({},t),Pm(u)))},e.$$.update=()=>{{const u=T3e(t.icon,i,r,l,a);n(0,o=u?M3e(u.data,t):null),o&&u.classes&&n(0,o.attributes.class=(typeof t.class=="string"?t.class+" ":"")+u.classes.join(" "),o)}},t=Pm(t),[o,i,r,s]}class R3e extends ve{constructor(t){super(),be(this,t,O3e,N3e,he,{})}}function YI(e){let t,n,i,r,s,o,a,l,u;return i=new R3e({props:{icon:"mdi:close"}}),o=new o5({props:{componentData:e[1]}}),{c(){t=H("div"),n=H("span"),ce(i.$$.fragment),r=je(),s=H("div"),ce(o.$$.fragment),D(n,"class","cancelButton svelte-1hhf5ym"),D(s,"class","modalContainer"),D(t,"class","modal svelte-1hhf5ym"),D(t,"data-component","modal")},m(c,f){z(c,t,f),X(t,n),le(i,n,null),X(t,r),X(t,s),le(o,s,null),a=!0,l||(u=[Il(s,"click",I3e),Il(t,"click",e[3])],l=!0)},p(c,f){const d={};f&2&&(d.componentData=c[1]),o.$set(d)},i(c){a||(F(i.$$.fragment,c),F(o.$$.fragment,c),a=!0)},o(c){N(i.$$.fragment,c),N(o.$$.fragment,c),a=!1},d(c){c&&L(t),ue(i),ue(o),l=!1,Ll(u)}}}function L3e(e){let t,n,i,r,s=e[0]&&e[1]&&YI(e);return{c(){s&&s.c(),t=Ae()},m(o,a){s&&s.m(o,a),z(o,t,a),n=!0,i||(r=Il(window,"keyup",e[2]),i=!0)},p(o,[a]){o[0]&&o[1]?s?(s.p(o,a),a&3&&F(s,1)):(s=YI(o),s.c(),F(s,1),s.m(t.parentNode,t)):s&&($e(),N(s,1,1,()=>{s=null}),Ee())},i(o){n||(F(s),n=!0)},o(o){N(s),n=!1},d(o){o&&L(t),s&&s.d(o),i=!1,r()}}}const I3e=e=>{e==null||e.stopImmediatePropagation()};function z3e(e,t,n){let i;_h(e,Fc,a=>n(1,i=a));let{componentData:r}=t;function s(a){a.code==="Escape"&&Fc.set(void 0)}function o(a){a.stopImmediatePropagation(),Fc.set(void 0)}return e.$$set=a=>{"componentData"in a&&n(0,r=a.componentData)},[r,i,s,o]}class P3e extends ve{constructor(t){super(),be(this,t,z3e,L3e,he,{componentData:0})}}function ZI(e,t,n){const i=e.slice();return i[2]=t[n][0],i[3]=t[n][1],i}function KI(e,t,n){const i=e.slice();return i[6]=t[n],i}function JI(e){let t,n=e[2]+"",i;return{c(){t=H("span"),i=Be(n),D(t,"class","pageId svelte-1kdpgko")},m(r,s){z(r,t,s),X(t,i)},p(r,s){s&1&&n!==(n=r[2]+"")&&pt(i,n)},d(r){r&&L(t)}}}function QI(e){let t,n,i=e[6]+"",r,s,o,a;function l(){return e[1](e[6])}return{c(){t=H("li"),n=H("button"),r=Be(i),s=je(),D(n,"class","textButton"),D(t,"class","sectionLink svelte-1kdpgko")},m(u,c){z(u,t,c),X(t,n),X(n,r),X(t,s),o||(a=Il(n,"click",l),o=!0)},p(u,c){e=u,c&1&&i!==(i=e[6]+"")&&pt(r,i)},d(u){u&&L(t),o=!1,a()}}}function ez(e){let t,n,i,r,s=e[2]&&JI(e),o=Oe(e[3]||[]),a=[];for(let l=0;l<o.length;l+=1)a[l]=QI(KI(e,o,l));return{c(){t=H("li"),s&&s.c(),n=je(),i=H("ul");for(let l=0;l<a.length;l+=1)a[l].c();r=je(),D(i,"class","navItem svelte-1kdpgko"),D(t,"class","svelte-1kdpgko")},m(l,u){z(l,t,u),s&&s.m(t,null),X(t,n),X(t,i);for(let c=0;c<a.length;c+=1)a[c]&&a[c].m(i,null);X(t,r)},p(l,u){if(l[2]?s?s.p(l,u):(s=JI(l),s.c(),s.m(t,n)):s&&(s.d(1),s=null),u&1){o=Oe(l[3]||[]);let c;for(c=0;c<o.length;c+=1){const f=KI(l,o,c);a[c]?a[c].p(f,u):(a[c]=QI(f),a[c].c(),a[c].m(i,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=o.length}},d(l){l&&L(t),s&&s.d(),Rt(a,l)}}}function B3e(e){let t,n,i=Oe(Object.entries(e[0])),r=[];for(let s=0;s<i.length;s+=1)r[s]=ez(ZI(e,i,s));return{c(){t=H("nav"),n=H("ul");for(let s=0;s<r.length;s+=1)r[s].c();D(n,"class","navList svelte-1kdpgko"),D(t,"class","nav svelte-1kdpgko")},m(s,o){z(s,t,o),X(t,n);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(n,null)},p(s,[o]){if(o&1){i=Oe(Object.entries(s[0]));let a;for(a=0;a<i.length;a+=1){const l=ZI(s,i,a);r[a]?r[a].p(l,o):(r[a]=ez(l),r[a].c(),r[a].m(n,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=i.length}},i:re,o:re,d(s){s&&L(t),Rt(r,s)}}}function j3e(e){const t=document.querySelector(`[data-section-id="${e}"]`);t==null||t.scrollIntoView({behavior:"smooth"})}function U3e(e,t,n){let{pageHierarchy:i={}}=t;const r=s=>j3e(s);return e.$$set=s=>{"pageHierarchy"in s&&n(0,i=s.pageHierarchy)},[i,r]}class q3e extends ve{constructor(t){super(),be(this,t,U3e,B3e,he,{pageHierarchy:0})}}const{Boolean:W3e}=fz;function tz(e,t,n){const i=e.slice();return i[5]=t[n],i}function H3e(e){var i;let t,n;return t=new q3e({props:{pageHierarchy:I5((i=e[0])==null?void 0:i.components)}}),{c(){ce(t.$$.fragment)},m(r,s){le(t,r,s),n=!0},p(r,s){var a;const o={};s&1&&(o.pageHierarchy=I5((a=r[0])==null?void 0:a.components)),t.$set(o)},i(r){n||(F(t.$$.fragment,r),n=!0)},o(r){N(t.$$.fragment,r),n=!1},d(r){ue(t,r)}}}function nz(e){let t,n;return t=new o5({props:{componentData:e[5]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&1&&(s.componentData=i[5]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function G3e(e){var o;let t,n,i=Oe(((o=e[0])==null?void 0:o.components)||[]),r=[];for(let a=0;a<i.length;a+=1)r[a]=nz(tz(e,i,a));const s=a=>N(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;a<r.length;a+=1)r[a].c();t=Ae()},m(a,l){for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(a,l);z(a,t,l),n=!0},p(a,l){var u;if(l&1){i=Oe(((u=a[0])==null?void 0:u.components)||[]);let c;for(c=0;c<i.length;c+=1){const f=tz(a,i,c);r[c]?(r[c].p(f,l),F(r[c],1)):(r[c]=nz(f),r[c].c(),F(r[c],1),r[c].m(t.parentNode,t))}for($e(),c=i.length;c<r.length;c+=1)s(c);Ee()}},i(a){if(!n){for(let l=0;l<i.length;l+=1)F(r[l]);n=!0}},o(a){r=r.filter(W3e);for(let l=0;l<r.length;l+=1)N(r[l]);n=!1},d(a){a&&L(t),Rt(r,a)}}}function iz(e){let t,n;return t=new P3e({props:{componentData:e[1]}}),{c(){ce(t.$$.fragment)},m(i,r){le(t,i,r),n=!0},p(i,r){const s={};r&2&&(s.componentData=i[1]),t.$set(s)},i(i){n||(F(t.$$.fragment,i),n=!0)},o(i){N(t.$$.fragment,i),n=!1},d(i){ue(t,i)}}}function V3e(e){let t,n,i,r,s,o,a;n=new Rz({props:{$$slots:{default:[H3e]},$$scope:{ctx:e}}}),r=new Cbe({props:{$$slots:{default:[G3e]},$$scope:{ctx:e}}});let l=e[1]&&iz(e);return{c(){t=H("div"),ce(n.$$.fragment),i=je(),ce(r.$$.fragment),s=je(),l&&l.c(),o=Ae(),D(t,"class","container mf-card svelte-teyund"),Vn(t,"embed",e[2])},m(u,c){z(u,t,c),le(n,t,null),X(t,i),le(r,t,null),z(u,s,c),l&&l.m(u,c),z(u,o,c),a=!0},p(u,[c]){const f={};c&257&&(f.$$scope={dirty:c,ctx:u}),n.$set(f);const d={};c&257&&(d.$$scope={dirty:c,ctx:u}),r.$set(d),u[1]?l?(l.p(u,c),c&2&&F(l,1)):(l=iz(u),l.c(),F(l,1),l.m(o.parentNode,o)):l&&($e(),N(l,1,1,()=>{l=null}),Ee())},i(u){a||(F(n.$$.fragment,u),F(r.$$.fragment,u),F(l),a=!0)},o(u){N(n.$$.fragment,u),N(r.$$.fragment,u),N(l),a=!1},d(u){u&&(L(t),L(s),L(o)),ue(n),ue(r),l&&l.d(u)}}}function X3e(e,t,n){let i,r;_h(e,Dr,l=>n(0,i=l)),_h(e,Fc,l=>n(1,r=l));let{cardDataId:s}=t;$z(s);let a=!!new URLSearchParams(window==null?void 0:window.location.search).get("embed");return e.$$set=l=>{"cardDataId"in l&&n(3,s=l.cardDataId)},[i,r,a,s]}class Y3e extends ve{constructor(t){super(),be(this,t,X3e,V3e,he,{cardDataId:3})}}let rz;try{const e=window.mfCardDataId,t=window.mfContainerId,n=(oz=document.querySelector(`[data-container="${t}"]`))==null?void 0:oz.querySelector(".card_app");rz=new Y3e({target:n??document.querySelector(".card_app"),props:{cardDataId:e}})}catch(e){throw new Error(e)}return rz});
|